diff options
Diffstat (limited to 'lib/Frontend/BoostConAction.cpp')
-rw-r--r-- | lib/Frontend/BoostConAction.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/Frontend/BoostConAction.cpp b/lib/Frontend/BoostConAction.cpp index ae150c6..4a12ff2 100644 --- a/lib/Frontend/BoostConAction.cpp +++ b/lib/Frontend/BoostConAction.cpp @@ -14,17 +14,17 @@ using namespace clang; namespace { - class BoostConASTConsumer : public ASTConsumer, + class BoostConASTConsumer : public ASTConsumer, public RecursiveASTVisitor<BoostConASTConsumer> { public: /// HandleTranslationUnit - This method is called when the ASTs for entire /// translation unit have been parsed. virtual void HandleTranslationUnit(ASTContext &Ctx); - + bool VisitCXXRecordDecl(CXXRecordDecl *D) { std::cout << D->getNameAsString() << std::endl; - return false; - } + return true; + } }; } @@ -35,5 +35,5 @@ ASTConsumer *BoostConAction::CreateASTConsumer(CompilerInstance &CI, void BoostConASTConsumer::HandleTranslationUnit(ASTContext &Ctx) { fprintf(stderr, "Welcome to BoostCon!\n"); - Visit(Ctx.getTranslationUnitDecl()); + TraverseDecl(Ctx.getTranslationUnitDecl()); } |