Lines Matching full:clang
5 LibTooling is a library to support writing standalone tools based on Clang.
9 For the information on how to setup Clang Tooling for LLVM see
15 Tools built with LibTooling, like Clang Plugins, run ``FrontendActions`` over
20 In this tutorial, we'll demonstrate the different ways of running Clang's
27 example to unit test parts of the Clang AST, ``runToolOnCode`` is what you
32 #include "clang/Tooling/Tooling.h"
37 EXPECT_TRUE(runToolOnCode(new clang::SyntaxOnlyAction, "class X {};"));
45 to run clang, it first needs to figure out what command line arguments to use
62 #include "clang/Tooling/CommonOptionsParser.h"
65 using namespace clang::tooling;
89 // A clang tool can run over a number of sources in the same process...
101 // newFrontendActionFactory<clang::SyntaxOnlyAction>().
102 int result = Tool.run(newFrontendActionFactory<clang::SyntaxOnlyAction>().get());
108 version of this example tool is also checked into the clang tree at
109 ``tools/clang-check/ClangCheck.cpp``.
113 // Declares clang::SyntaxOnlyAction.
114 #include "clang/Frontend/FrontendActions.h"
115 #include "clang/Tooling/CommonOptionsParser.h"
116 #include "clang/Tooling/Tooling.h"
120 using namespace clang::tooling;
139 return Tool.run(newFrontendActionFactory<clang::SyntaxOnlyAction>().get());
145 When you check out and build clang, clang-check is already built and available
146 to you in bin/clang-check inside your build directory.
148 You can run clang-check on a file in the llvm repository by specifying all the
155 $ $BD/bin/clang-check tools/clang/tools/clang-check/ClangCheck.cpp -- \
156 clang++ -D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS \
157 -Itools/clang/include -I$BD/include -Iinclude \
158 -Itools/clang/lib/Headers -c
170 Now you can run :program:`clang-check` over files in the project by specifying
178 $ $BD/bin/clang-check -p $BD tools/clang/tools/clang-check/ClangCheck.cpp
186 Clang tools need their builtin headers and search for them the same way Clang
188 ``$(dirname /path/to/tool)/../lib/clang/3.3/include`` relative to the tool
190 binary directory after building clang-headers, or if the tool is running from
191 the binary directory of a clang install next to the clang binary.
200 example `clang-check/Makefile
201 <http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/clang-check/Makefile?view=markup>`_).