diff --git a/clang/docs/HowToSetupToolingForLLVM.html b/clang/docs/HowToSetupToolingForLLVM.html index b9f258314052862e307c3205ea1aadaac0f9a8b6..493c8820fc4f6a032e4b358d8dbc7eede2a1c69d 100644 --- a/clang/docs/HowToSetupToolingForLLVM.html +++ b/clang/docs/HowToSetupToolingForLLVM.html @@ -84,6 +84,42 @@ into your .vimrc:

When editing C++ code, hit F5 to reparse the current buffer. The output will go into the error window, which you can enable with :cope.

+

Other clang-check options that can be useful when working with +clang AST:

+ +

Examples:

+
+$ clang-check tools/clang/tools/clang-check/ClangCheck.cpp -ast-dump -ast-dump-filter ActionFactory::newASTConsumer
+Processing: tools/clang/tools/clang-check/ClangCheck.cpp.
+Dumping ::ActionFactory::newASTConsumer:
+clang::ASTConsumer *newASTConsumer() (CompoundStmt 0x44da290 </home/alexfh/local/llvm/tools/clang/tools/clang-check/ClangCheck.cpp:64:40, line:72:3>
+  (IfStmt 0x44d97c8 <line:65:5, line:66:45>
+    <<<NULL>>>
+      (ImplicitCastExpr 0x44d96d0 <line:65:9> '_Bool':'_Bool' <UserDefinedConversion>
+...
+$ clang-check tools/clang/tools/clang-check/ClangCheck.cpp -ast-print -ast-dump-filter ActionFactory::newASTConsumer
+Processing: tools/clang/tools/clang-check/ClangCheck.cpp.
+Printing <anonymous namespace>::ActionFactory::newASTConsumer:
+clang::ASTConsumer *newASTConsumer() {
+    if (this->ASTList.operator _Bool())
+        return clang::CreateASTDeclNodeLister();
+    if (this->ASTDump.operator _Bool())
+        return clang::CreateASTDumper(this->ASTDumpFilter);
+    if (this->ASTPrint.operator _Bool())
+        return clang::CreateASTPrinter(&llvm::outs(), this->ASTDumpFilter);
+    return new clang::ASTConsumer();
+}
+

(Experimental) Using Ninja Build System