Index: tools/clang/plugins/FindBadConstructsConsumer.h |
diff --git a/tools/clang/plugins/FindBadConstructsConsumer.h b/tools/clang/plugins/FindBadConstructsConsumer.h |
index cf048ae8f573d13b56ce8684d920467cc6603080..6e2b2c9234265665bc47a0a2bcba1521518bc04d 100644 |
--- a/tools/clang/plugins/FindBadConstructsConsumer.h |
+++ b/tools/clang/plugins/FindBadConstructsConsumer.h |
@@ -21,6 +21,7 @@ |
#include "clang/AST/ASTConsumer.h" |
#include "clang/AST/Attr.h" |
#include "clang/AST/CXXInheritance.h" |
+#include "clang/AST/RecursiveASTVisitor.h" |
#include "clang/AST/TypeLoc.h" |
#include "clang/Basic/SourceManager.h" |
@@ -30,11 +31,16 @@ |
namespace chrome_checker { |
// Searches for constructs that we know we don't want in the Chromium code base. |
-class FindBadConstructsConsumer : public ChromeClassTester { |
+class FindBadConstructsConsumer |
+ : public clang::RecursiveASTVisitor<FindBadConstructsConsumer>, |
+ public ChromeClassTester { |
public: |
FindBadConstructsConsumer(clang::CompilerInstance& instance, |
const Options& options); |
+ // RecursiveASTVisitor: |
+ bool VisitDecl(clang::Decl* decl); |
+ |
// ChromeClassTester overrides: |
void CheckChromeClass(clang::SourceLocation record_location, |
clang::CXXRecordDecl* record) override; |