Chromium Code Reviews| Index: tools/clang/plugins/FindBadConstructs.cpp |
| diff --git a/tools/clang/plugins/FindBadConstructs.cpp b/tools/clang/plugins/FindBadConstructs.cpp |
| index 0473a97a80897b5a659dece29886fea0a476ddc2..ed9647f993ab0726afc2b7dcc49fa381bc42579c 100644 |
| --- a/tools/clang/plugins/FindBadConstructs.cpp |
| +++ b/tools/clang/plugins/FindBadConstructs.cpp |
| @@ -75,10 +75,12 @@ class FindBadConstructsConsumer : public ChromeClassTester { |
| public: |
| FindBadConstructsConsumer(CompilerInstance& instance, |
| bool check_base_classes, |
| - bool check_virtuals_in_implementations) |
| - : ChromeClassTester(instance), |
| + bool check_virtuals_in_implementations, |
| + bool check_url_directory) |
| + : ChromeClassTester(instance, check_url_directory), |
| check_base_classes_(check_base_classes), |
| - check_virtuals_in_implementations_(check_virtuals_in_implementations) { |
| + check_virtuals_in_implementations_(check_virtuals_in_implementations), |
| + check_url_directory_(check_url_directory) { |
|
Nico
2013/04/16 15:31:11
Do you need this part? You're already passing this
|
| // Register warning/error messages. |
| diag_method_requires_override_ = diagnostic().getCustomDiagID( |
| getErrorLevel(), kMethodRequiresOverride); |
| @@ -619,7 +621,8 @@ class FindBadConstructsAction : public PluginASTAction { |
| public: |
| FindBadConstructsAction() |
| : check_base_classes_(false), |
| - check_virtuals_in_implementations_(true) { |
| + check_virtuals_in_implementations_(true), |
| + check_url_directory_(false) { |
| } |
| protected: |
| @@ -627,7 +630,8 @@ class FindBadConstructsAction : public PluginASTAction { |
| virtual ASTConsumer* CreateASTConsumer(CompilerInstance& instance, |
| llvm::StringRef ref) { |
| return new FindBadConstructsConsumer( |
| - instance, check_base_classes_, check_virtuals_in_implementations_); |
| + instance, check_base_classes_, check_virtuals_in_implementations_, |
| + check_url_directory_); |
| } |
| virtual bool ParseArgs(const CompilerInstance& instance, |
| @@ -641,6 +645,9 @@ class FindBadConstructsAction : public PluginASTAction { |
| } else if (args[i] == "check-base-classes") { |
| // TODO(rsleevi): Remove this once http://crbug.com/123295 is fixed. |
| check_base_classes_ = true; |
| + } else if (args[i] == "check-url-directory") { |
| + // TODO(tfarina): Remove this once http://crbug.com/229660 is fixed. |
| + check_url_directory_ = true; |
| } else { |
| parsed = false; |
| llvm::errs() << "Unknown clang plugin argument: " << args[i] << "\n"; |
| @@ -653,6 +660,7 @@ class FindBadConstructsAction : public PluginASTAction { |
| private: |
| bool check_base_classes_; |
| bool check_virtuals_in_implementations_; |
| + bool check_url_directory_; |
| }; |
| } // namespace |