diff options
author | hans@chromium.org <hans@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-08-15 19:32:38 +0000 |
---|---|---|
committer | hans@chromium.org <hans@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-08-15 19:32:38 +0000 |
commit | 5ca9109fed66f707877dd0d0abc6880d6cd1915e (patch) | |
tree | 4ce2a778cb33e42075d04f3ab7cba64019fd9ea1 /tools/clang | |
parent | 66d3a0cf07403dadf56b3c42e63d9e04d4d81466 (diff) | |
download | chromium_src-5ca9109fed66f707877dd0d0abc6880d6cd1915e.zip chromium_src-5ca9109fed66f707877dd0d0abc6880d6cd1915e.tar.gz chromium_src-5ca9109fed66f707877dd0d0abc6880d6cd1915e.tar.bz2 |
Style plugin: remove temporary flag for checking inner classes.
The flag was there to make checking of inner classes optional
until all inner classes could be fixed.
We must still parse the flag until this has been rolled in and
plugin_flags.sh has been updated not to pass in the flag anymore.
BUG=136863
Review URL: https://chromiumcodereview.appspot.com/10837254
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@151727 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'tools/clang')
-rw-r--r-- | tools/clang/plugins/ChromeClassTester.cpp | 10 | ||||
-rw-r--r-- | tools/clang/plugins/ChromeClassTester.h | 4 | ||||
-rw-r--r-- | tools/clang/plugins/FindBadConstructs.cpp | 9 | ||||
-rwxr-xr-x | tools/clang/plugins/tests/test.sh | 2 |
4 files changed, 4 insertions, 21 deletions
diff --git a/tools/clang/plugins/ChromeClassTester.cpp b/tools/clang/plugins/ChromeClassTester.cpp index f32fbf1..ae22105 100644 --- a/tools/clang/plugins/ChromeClassTester.cpp +++ b/tools/clang/plugins/ChromeClassTester.cpp @@ -37,11 +37,9 @@ bool ends_with(const std::string& one, const std::string& two) { } // namespace ChromeClassTester::ChromeClassTester(CompilerInstance& instance, - bool check_inner_classes, bool check_cc_directory) : instance_(instance), diagnostic_(instance.getDiagnostics()), - check_inner_classes_(check_inner_classes), check_cc_directory_(check_cc_directory) { BuildBannedLists(); } @@ -49,13 +47,7 @@ ChromeClassTester::ChromeClassTester(CompilerInstance& instance, ChromeClassTester::~ChromeClassTester() {} void ChromeClassTester::HandleTagDeclDefinition(TagDecl* 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); - } + pending_class_decls_.push_back(tag); } bool ChromeClassTester::HandleTopLevelDecl(DeclGroupRef group_ref) { diff --git a/tools/clang/plugins/ChromeClassTester.h b/tools/clang/plugins/ChromeClassTester.h index 07ead95..716ff34 100644 --- a/tools/clang/plugins/ChromeClassTester.h +++ b/tools/clang/plugins/ChromeClassTester.h @@ -17,7 +17,6 @@ class ChromeClassTester : public clang::ASTConsumer { public: explicit ChromeClassTester(clang::CompilerInstance& instance, - bool check_inner_classes, bool check_cc_directory); virtual ~ChromeClassTester(); @@ -82,9 +81,6 @@ class ChromeClassTester : public clang::ASTConsumer { // List of decls to check once the current top-level decl is parsed. std::vector<clang::TagDecl*> pending_class_decls_; - // TODO: Remove once all inner classes are cleaned up. - bool check_inner_classes_; - // TODO(jamesr): Remove once cc/ directory compiles without warnings. bool check_cc_directory_; }; diff --git a/tools/clang/plugins/FindBadConstructs.cpp b/tools/clang/plugins/FindBadConstructs.cpp index 0c41d7c..e6c4445 100644 --- a/tools/clang/plugins/FindBadConstructs.cpp +++ b/tools/clang/plugins/FindBadConstructs.cpp @@ -51,9 +51,8 @@ class FindBadConstructsConsumer : public ChromeClassTester { FindBadConstructsConsumer(CompilerInstance& instance, bool check_refcounted_dtors, bool check_virtuals_in_implementations, - bool check_inner_classes, bool check_cc_directory) - : ChromeClassTester(instance, check_inner_classes, check_cc_directory), + : ChromeClassTester(instance, check_cc_directory), check_refcounted_dtors_(check_refcounted_dtors), check_virtuals_in_implementations_(check_virtuals_in_implementations) { } @@ -398,7 +397,6 @@ class FindBadConstructsAction : public PluginASTAction { FindBadConstructsAction() : check_refcounted_dtors_(true), check_virtuals_in_implementations_(true), - check_inner_classes_(false), check_cc_directory_(false) { } @@ -408,7 +406,7 @@ class FindBadConstructsAction : public PluginASTAction { llvm::StringRef ref) { return new FindBadConstructsConsumer( instance, check_refcounted_dtors_, check_virtuals_in_implementations_, - check_inner_classes_, check_cc_directory_); + check_cc_directory_); } virtual bool ParseArgs(const CompilerInstance& instance, @@ -421,7 +419,7 @@ class FindBadConstructsAction : public PluginASTAction { } else if (args[i] == "skip-virtuals-in-implementations") { check_virtuals_in_implementations_ = false; } else if (args[i] == "check-inner-classes") { - check_inner_classes_ = true; + // TODO(hans): Remove this once it's removed from plugin_flags.sh. } else if (args[i] == "check-cc-directory") { check_cc_directory_ = true; } else { @@ -436,7 +434,6 @@ class FindBadConstructsAction : public PluginASTAction { private: bool check_refcounted_dtors_; bool check_virtuals_in_implementations_; - bool check_inner_classes_; bool check_cc_directory_; }; diff --git a/tools/clang/plugins/tests/test.sh b/tools/clang/plugins/tests/test.sh index eec23dd..262ebbb 100755 --- a/tools/clang/plugins/tests/test.sh +++ b/tools/clang/plugins/tests/test.sh @@ -25,8 +25,6 @@ usage() { do_testcase() { local output="$("${CLANG_DIR}"/bin/clang -c -Wno-c++11-extensions \ -Xclang -load -Xclang "${CLANG_DIR}"/lib/libFindBadConstructs.${LIB} \ - -Xclang -plugin-arg-find-bad-constructs \ - -Xclang check-inner-classes \ -Xclang -plugin -Xclang find-bad-constructs ${1} 2>&1)" local diffout="$(echo "${output}" | diff - "${2}")" if [ "${diffout}" = "" ]; then |