Lines Matching full:clang
2 How To Setup Clang Tooling For LLVM
5 Clang Tooling provides infrastructure to write tools that need syntactic
7 of specific tools using this infrastructure (e.g. ``clang-check``). This
8 document provides information on how to set up and use Clang Tooling for
14 Clang Tooling needs a compilation database to figure out specific build
17 invoking clang tools, you can either specify a path to a build directory
18 using a command line parameter ``-p`` or let Clang Tooling find this
20 build using CMake to use clang tools.
22 Setup Clang Tooling Using CMake and Make
37 If you want to use clang instead of GCC, you can add
38 ``-DCMAKE_C_COMPILER=/path/to/clang -DCMAKE_CXX_COMPILER=/path/to/clang++``.
44 Clang Tooling is able to use it:
56 Using Clang Tools
59 After you completed the previous steps, you are ready to run clang tools. If
60 you have a recent clang installed, you should have ``clang-check`` in
65 $ clang-check tools/clang/lib/Tooling/CompilationDatabase.cpp
67 If you're using vim, it's convenient to have clang-check integrated. Put
88 call ClangCheckImpl("clang-check " . l:filename)
92 echo "Can't detect file's compilation arguments and no previous clang-check invocation!"
100 will re-run the last clang-check invocation made from this vim instance
102 automatically when clang-check finds errors, and can be re-opened with
105 Other ``clang-check`` options that can be useful when working with clang
121 …$ clang-check tools/clang/tools/clang-check/ClangCheck.cpp -ast-dump -ast-dump-filter ActionFactor…
122 Processing: tools/clang/tools/clang-check/ClangCheck.cpp.
124 …clang::ASTConsumer *newASTConsumer() (CompoundStmt 0x44da290 </home/alexfh/local/llvm/tools/clang/…
129 …$ clang-check tools/clang/tools/clang-check/ClangCheck.cpp -ast-print -ast-dump-filter ActionFacto…
130 Processing: tools/clang/tools/clang-check/ClangCheck.cpp.
132 clang::ASTConsumer *newASTConsumer() {
134 return clang::CreateASTDeclNodeLister();
136 return clang::CreateASTDumper(this->ASTDumpFilter);
138 return clang::CreateASTPrinter(&llvm::outs(), this->ASTDumpFilter);
139 return new clang::ASTConsumer();
149 To take advantage of using Clang Tools along with Ninja build you need
179 If you want to use clang instead of GCC, you can add
180 ``-DCMAKE_C_COMPILER=/path/to/clang -DCMAKE_CXX_COMPILER=/path/to/clang++``.
186 Clang Tooling is able to use it: