[cfe-dev] Not getting expected Decls (possible newbie mistake)
dnnrly at gmail.com
Tue Feb 23 14:11:22 PST 2010
I hate to sound like I'm having a conversation with myself but I just
thought I'd update this thread for the sake of anyone that has a similar
problem in the future. I've found lots of previous threads useful myself so
I wanted to make sure that I followed up properly.
It appears that the problem is that I wasn't setting the language properly
and the namespace keyword and Stuff::Thingy declaration weren't being
recognised as good C++.
One thing that helped me diagnose this was to iterate through the strings
output from the diagnostics via the diagnostics buffer via the
To solve this in the short term I did this:
CompilerInvocation *pInv = new CompilerInvocation()
pInv->getLangOpts().CPlusPlus = 1;
The next problem I found was that when I tried point to another file, the
parser couldn't find any include files. The solution to this problem is to
parse the command line with full -I options included. A great example of how
to do this can be found in:
I hope someone (anyone) finds this useful.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the cfe-dev