the situation is quite tricky, I simplified it a little
I have VS 2008 SP1, VA 10.6.189.0 built 2011.10.02
main.cpp
struct S {
void func() {}
};
//////////////////////////////////////////////////////////////////////////
struct S2 {
S& GetS() {
static S s;
return s;
}
};
void* GetS2() {
static S2 s;
return &s;
}
//////////////////////////////////////////////////////////////////////////
#define DEFINED_S (((S2*)GetS2())->GetS())
int main()
{
DEFINED_S.func();
}
when I try find references for the function S::func() VA doesn't find it in the function main()