[cfe-dev] Running clang programmatically

Stefan Seefeld stefan.seefeld at gmail.com
Thu Mar 18 07:00:55 PDT 2010


I still have trouble running clang programmatically, and I'm not quite 
sure what goes wrong. I have attached a minimal test case demonstrating 
the problem:

I compiled it as "g++ -o clang clang.cc -lCIndex", then invoke that on a 
little test C++ input, via "./clang test.cc".

I then attempt to print the location of the first traversed cursor, but 
get nonsense. (The reported cursor type also seems incorrect, as I get a 
CXCursor_StructDecl, with an input file not containing any struct.)

Can anybody please help me figure out what I'm doing wrong ?

(And this time with attachment. Sorry for the noise.)


Thanks,
         Stefan

-- 

       ...ich hab' noch einen Koffer in Berlin...

-------------- next part --------------
A non-text attachment was scrubbed...
Name: clang.cc
Type: text/x-c++src
Size: 1292 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20100318/46a94f49/attachment.cc>


More information about the cfe-dev mailing list