The language parsing in Source Insight is somewhere between a strict grammar parser, and a simple pattern matcher. This is good because the parser is error-tolerant and works well on code that can be incomplete or have some syntax errors. However, there are some points to keep in mind:
The source files can have syntax errors. They don't have to be compiled. That means symbols will be found in source code that doesn't even compile or is in an intermediate state, which is most of the time!
Preprocessor macros are not expanded before Source Insight parses the code. This may sound bad, but in reality it works quite well. Source Insight parses your program at its most abstract level - at the same level as it was written. Among other things, this also allows call trees to contain function-like macros.
Symbol declarations are parsed from all of the source code, not just what was active at the time of compilation. For example, C/C++ code inside of #ifdef-#endif clauses are also added to the symbol database, even if the #ifdef branch is not active when you compile. This can be a great help if you are working on a multi-state program, and you need to be aware of all cases, not only what the compiler sees. If you do want to omit inactive code blocks, you can define condition values with the Edit Condition command, or in Options > Preferences: Languages.
The text in comments and constants is also indexed for searching. Source Insight is focused on source level code; not just what the compiler transforms into object code.
All header files are assumed accessible in all source files. Source Insight does not notice what header files are included in each particular source file. Therefore, all symbols are known at all points. This is technically inaccurate with respect to how a compiler will see your program, but in most cases it works well. This is a trade-off of speed versus complete correctness.
Some programming styles may cause symbols not to be found by Source Insight. The default parsing that Source Insight uses works very well with most programming styles. In the event that you have some declarations types that Source Insight can't recognize, you can add Token Macros, which expand during a preprocessing phase, or you can add a custom parsing regular expression pattern. See: Preprocessor Token Macros.
Because regular C/C++ preprocessing is not performed by Source Insight's parsers, some coding styles affect parsing correctness in Source Insight.
Having #ifdef blocks break up an individual declaration will confuse Source Insight. If it cannot be avoided, and Source Insight doesn't parse the code correctly, you will need to define the condition value using Edit Condition, so that Source Insight will disable the inactive block of code causing the confusion. See: Conditional Parsing.
For example:
void MyFunc
#ifdef XYZ
(int param1, int param2)
#else
(long param1, long param2)
#endif
{
...
}
Replacing standard language keywords or combinations with #define'd substitutions will confuse Source Insight. If you cannot avoid this, then you will need to define Token Macros to support them. See: Preprocessor Token Macros.
For example:
#define ourpublic public
class D : ourpublic B { … }
This causes a problem because Source Insight doesn't know that the keyword ourpublic really means public.