[cfe-users] Libclang -ast-dump

Sidharth Chaturvedi sidchat.04 at gmail.com
Fri Apr 17 12:42:09 PDT 2015


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);

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

More information about the cfe-users mailing list