[cfe-users] Libclang -ast-dump

Sidharth Chaturvedi sidchat.04 at gmail.com
Fri Apr 17 16:20:52 PDT 2015


Hi,

I am trying to write a program that dumps the AST for a piece of code using
Libclang. For this, I am passing "-Xclang" and "-ast-dump" as arguments to
"clang_createTranslationUnitFromSourceFile". But this does not work. Can
anyone tell me what I am doing wrong? Here is my exact code snippet:

const char* args[] = {"-Xclang", "-ast-dump"};
CXTranslationUnit tu = clang_createTranslationUnitFromSourceFile(CIdx,
fileName, 2, args, 0, 0);

-- 
Thanks
Sidharth Chaturvedi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-users/attachments/20150418/57ef44a8/attachment.html>


More information about the cfe-users mailing list