IDE: Visual Studio 2010
VAX: 10.6.1850.0
Find all references and renaming do not work correctly in anonymous namespaces of different implementation files when they both contain declarations of the same name.
Say you have two implementation files:
test.cpp:
namespace
{
int x = 5;
void func() { }
}
test2.cpp:
namespace
{
int x = 0;
void func() { ++x; }
}
void func()
{ }
If you were to find references of x in test.cpp you will also get both references of x from test2.cpp.
The same behavior occurs when searching for func.
If you were to find references of x in test2.cpp you will also get the reference of x from test.cpp.
The same behavior occurs when searching for func. Also, it is finding the global func which it should not be finding.