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

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

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/FindBadConstructsConsumer.h ('k') | tools/clang/plugins/Options.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/clang/plugins/FindBadConstructsConsumer.cpp
diff --git a/tools/clang/plugins/FindBadConstructsConsumer.cpp b/tools/clang/plugins/FindBadConstructsConsumer.cpp
index f08ca712d5be731c8632b72dee76b3e0f969d666..4f281f1da0364df84b512ce544dd0c52c68dda1d 100644
--- a/tools/clang/plugins/FindBadConstructsConsumer.cpp
+++ b/tools/clang/plugins/FindBadConstructsConsumer.cpp
@@ -127,6 +127,13 @@ FindBadConstructsConsumer::FindBadConstructsConsumer(CompilerInstance& instance,
DiagnosticsEngine::Note, kNoteProtectedNonVirtualDtor);
}
+bool FindBadConstructsConsumer::VisitDecl(clang::Decl* decl) {
+ clang::TagDecl* tag_decl = dyn_cast<clang::TagDecl>(decl);
+ if (tag_decl && tag_decl->isCompleteDefinition())
+ CheckTag(tag_decl);
+ return true;
+}
+
void FindBadConstructsConsumer::CheckChromeClass(SourceLocation record_location,
CXXRecordDecl* record) {
bool implementation_file = InImplementationFile(record_location);
« no previous file with comments | « tools/clang/plugins/FindBadConstructsConsumer.h ('k') | tools/clang/plugins/Options.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698