Hi
I've observed strange behavior in my Codan checkers, and I failed so far to figure out the reason for this.
I've got a checker which should find undefined (class) types and marks them. Usually this checker works fine, but in an environment where I have two projects (A and B, where A references B) the checker does not get updated
consistently. In my case I have a A.cpp file in project A referencing a B.h file from project B. In the .cpp file I have a variable declaration of type B. This type B is not defined:
//A.cpp in project A:
void foo() {
B b;
}
//B.h in project B:
//empty
In this case my checker works and B in A.cpp gets marked.
When I update B.h as follows:
//B.h in project B:
struct B{};
I expect the Codan marker in A.cpp to vanish, but it does not. I can make it vanish by either rebuilding the index of A or by running "Run C/C++ Code Analysis" on A.cpp. When I do this the marker vanishes. So I expected
the index used with A.cpp did not get the update.
Now the strange part:
When I revert the change in B.h, the codan marker reappears in A.cpp by itself (without explicitly rebuilding the index or running the analysis).
Does anybody have an idea why I can observe this asymmetric behavior?
Thanks for any input!
Thomas
PS: My checker works on ProblemBindings.