Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(38)

Unified Diff: tools/clang/plugins/FindBadConstructsConsumer.h

Issue 751233002: Switch the Clang plugin to use RecursiveASTVisitor. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/clang/plugins/FindBadConstructsAction.cpp ('k') | tools/clang/plugins/FindBadConstructsConsumer.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« no previous file with comments | « tools/clang/plugins/FindBadConstructsAction.cpp ('k') | tools/clang/plugins/FindBadConstructsConsumer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698