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.<br>
<br>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++.<br>
<br>
One thing that helped me diagnose this was to iterate through the strings output from the diagnostics via the diagnostics buffer via the error_begin/end methods.<br><br>To solve this in the short term I did this:<br><br>
CompilerInvocation *pInv = new CompilerInvocation()<br>pInv->getLangOpts().CPlusPlus = 1;<br>compiler_instance.setInvocation(pInv);<br><br>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:<br>
tools/driver/cc1_main.cpp: cc1_main(...)<br><br>I hope someone (anyone) finds this useful.<br><br>Pascal<br>