diff options
author | Manuel Klimek <klimek@google.com> | 2013-03-04 11:31:46 +0000 |
---|---|---|
committer | Manuel Klimek <klimek@google.com> | 2013-03-04 11:31:46 +0000 |
commit | e3a2b81429d935e3cfafa4c3ad1b21b957653165 (patch) | |
tree | d8a61151950c5a5d1a8ccca3805b88b03c0ccc9b | |
parent | 2f8845fa59587456d53aa6056ee79984812fdf14 (diff) |
Make the tutorial easier to compile by adding in some of the details.
Patch by Béatrice Creusillet.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176434 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | docs/LibASTMatchersTutorial.rst | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/docs/LibASTMatchersTutorial.rst b/docs/LibASTMatchersTutorial.rst index 3d0af67cb5..381c558705 100644 --- a/docs/LibASTMatchersTutorial.rst +++ b/docs/LibASTMatchersTutorial.rst @@ -261,6 +261,11 @@ from a ``ClangTool``. More code! Add the following to ``LoopConvert.cpp``: :: + #include "clang/ASTMatchers/ASTMatchers.h" + #include "clang/ASTMatchers/ASTMatchFinder.h" + + using namespace clang; + using namespace clang::ast_matchers; StatementMatcher LoopMatcher = forStmt(hasLoopInit(declStmt(hasSingleDecl(varDecl( |