In Visual C++ 2010, the parser called "tag parser", see
Tag Parsing C++ - Visual C++ Team Blog - Site Home - MSDN BlogsIt seems they admit that Parsering C++ code is some times so hard.
due to preprocessors and the complexity of c++ grammer.
An old article can be find here:
http://msdn.microsoft.com/en-us/library/ms379615%28VS.80%29.aspx# IntelliSense does not support parsing the same file under different macro states in the same solution. (The macro state of a file refers to the values given to all macros existing in the file; different values mean different macro states for the same file.)
In most cases we will parse the header file only once (for speed reasons), even if the same header file is included under different macro states in the same source file, on different source files in the same project, or in different projects in the same solution. This means that the files that depend on this header file in a macro state that is not the one populated may not show 100-percent accurate IntelliSense information.
Our parser in CC just do the similar thing.