r176434 - Make the tutorial easier to compile by adding in some of the details.

Manuel Klimek klimek at google.com
Mon Mar 4 03:31:47 PST 2013


Author: klimek
Date: Mon Mar  4 05:31:46 2013
New Revision: 176434

URL: http://llvm.org/viewvc/llvm-project?rev=176434&view=rev
Log:
Make the tutorial easier to compile by adding in some of the details.

Patch by BĂ©atrice Creusillet.

Modified:
    cfe/trunk/docs/LibASTMatchersTutorial.rst

Modified: cfe/trunk/docs/LibASTMatchersTutorial.rst
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/docs/LibASTMatchersTutorial.rst?rev=176434&r1=176433&r2=176434&view=diff
==============================================================================
--- cfe/trunk/docs/LibASTMatchersTutorial.rst (original)
+++ cfe/trunk/docs/LibASTMatchersTutorial.rst Mon Mar  4 05:31:46 2013
@@ -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(





More information about the cfe-commits mailing list