The following problem plagues one of my projects for a long time:
Some function definitions (from .cpp files) are excluded/hidden from intellisense!
As usual, interest in my question ebbed up after a couple of hours, so I had to figure it out by myself...
We just have to use the concept of cpp.hint
files.
Basically you have to put the troublesome macros into a file named cpp.hint
and put that file in your solution directory (which did not work for me)
OR in a parent-directory where your code files reside in. (worked for me)
In that file we just put the troublesome macros WITHOUT right-hand-side, so e.g.:
#define forlist(x,list)
NOTE: Your must reset IntelliSense cache for use new data from changed
cpp.hint
file. You should:
- delete
ipch
folder (usually placed in Solution folder).- delete all *.sdf files in Solution folder.
- delete all *.VC.db files in Solution folder or in
ipch
folder.
For more advanced macros (like having 'start' and 'end' macros for code blocks), there are some other tricks.
The original link is: http://msdn.microsoft.com/en-us/library/dd997977.aspx
The reason for the trouble is that Intellisense performance would (potentially) decrease dramatically if it had to parse all macros in a project, so it only parses those given explicitly in 'cpp.hint'.