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

Unified Diff: tools/clang/plugins/FindBadConstructs.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/FindBadConstructs.cpp
diff --git a/tools/clang/plugins/FindBadConstructs.cpp b/tools/clang/plugins/FindBadConstructs.cpp
index b79a64dbd19959bc449719681212961ed39b382b..b9e1f5b1755c8649c607d9604b91a45de414e43e 100644
--- a/tools/clang/plugins/FindBadConstructs.cpp
+++ b/tools/clang/plugins/FindBadConstructs.cpp
@@ -50,8 +50,9 @@ class FindBadConstructsConsumer : public ChromeClassTester {
public:
FindBadConstructsConsumer(CompilerInstance& instance,
bool check_refcounted_dtors,
- bool check_virtuals_in_implementations)
- : ChromeClassTester(instance),
+ bool check_virtuals_in_implementations,
+ bool check_inner_classes)
+ : ChromeClassTester(instance, check_inner_classes),
check_refcounted_dtors_(check_refcounted_dtors),
check_virtuals_in_implementations_(check_virtuals_in_implementations) {
}
@@ -395,7 +396,8 @@ class FindBadConstructsAction : public PluginASTAction {
public:
FindBadConstructsAction()
: check_refcounted_dtors_(true),
- check_virtuals_in_implementations_(true) {
+ check_virtuals_in_implementations_(true),
+ check_inner_classes_(false) {
}
protected:
@@ -403,7 +405,8 @@ class FindBadConstructsAction : public PluginASTAction {
virtual ASTConsumer* CreateASTConsumer(CompilerInstance& instance,
llvm::StringRef ref) {
return new FindBadConstructsConsumer(
- instance, check_refcounted_dtors_, check_virtuals_in_implementations_);
+ instance, check_refcounted_dtors_, check_virtuals_in_implementations_,
+ check_inner_classes_);
}
virtual bool ParseArgs(const CompilerInstance& instance,
@@ -415,6 +418,8 @@ class FindBadConstructsAction : public PluginASTAction {
check_refcounted_dtors_ = false;
} else if (args[i] == "skip-virtuals-in-implementations") {
check_virtuals_in_implementations_ = false;
+ } else if (args[i] == "check-inner-classes") {
+ check_inner_classes_ = true;
} else {
parsed = false;
llvm::errs() << "Unknown argument: " << args[i] << "\n";
@@ -427,6 +432,7 @@ class FindBadConstructsAction : public PluginASTAction {
private:
bool check_refcounted_dtors_;
bool check_virtuals_in_implementations_;
+ bool check_inner_classes_;
};
} // namespace
« tools/clang/plugins/ChromeClassTester.h ('K') | « tools/clang/plugins/ChromeClassTester.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698