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

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

Issue 10828057: clang plugin: Put inner classes bugfix behind a flag. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: switch default Created 8 years, 5 months 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
Index: tools/clang/plugins/ChromeClassTester.cpp
diff --git a/tools/clang/plugins/ChromeClassTester.cpp b/tools/clang/plugins/ChromeClassTester.cpp
index 82807990635c5db7995d2955f7639b563f878028..c61271b1b93f96929c6309dee2263acee770c72b 100644
--- a/tools/clang/plugins/ChromeClassTester.cpp
+++ b/tools/clang/plugins/ChromeClassTester.cpp
@@ -36,18 +36,24 @@ bool ends_with(const std::string& one, const std::string& two) {
} // namespace
-ChromeClassTester::ChromeClassTester(CompilerInstance& instance)
+ChromeClassTester::ChromeClassTester(CompilerInstance& instance,
+ bool check_inner_classes)
: instance_(instance),
- diagnostic_(instance.getDiagnostics()) {
+ diagnostic_(instance.getDiagnostics()),
+ check_inner_classes_(check_inner_classes) {
BuildBannedLists();
}
ChromeClassTester::~ChromeClassTester() {}
void ChromeClassTester::HandleTagDeclDefinition(TagDecl* tag) {
- // Defer processing of this tag until its containing top-level
- // declaration has been fully parsed. See crbug.com/136863.
- pending_class_decls_.push_back(tag);
+ if (check_inner_classes_) {
+ // Defer processing of this tag until its containing top-level
+ // declaration has been fully parsed. See crbug.com/136863.
+ pending_class_decls_.push_back(tag);
+ } else {
+ CheckTag(tag);
+ }
}
bool ChromeClassTester::HandleTopLevelDecl(DeclGroupRef group_ref) {

Powered by Google App Engine
This is Rietveld 408576698