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

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

Issue 14064011: Add url/ to banned_directories in clang style checker. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: make it private Created 7 years, 8 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
« no previous file with comments | « tools/clang/plugins/ChromeClassTester.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/clang/plugins/FindBadConstructs.cpp
diff --git a/tools/clang/plugins/FindBadConstructs.cpp b/tools/clang/plugins/FindBadConstructs.cpp
index 0473a97a80897b5a659dece29886fea0a476ddc2..9697c5f21104825a31c066099ca7ccea13d2ae9d 100644
--- a/tools/clang/plugins/FindBadConstructs.cpp
+++ b/tools/clang/plugins/FindBadConstructs.cpp
@@ -75,8 +75,9 @@ 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) {
// Register warning/error messages.
@@ -619,7 +620,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 +629,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 +644,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 +659,7 @@ class FindBadConstructsAction : public PluginASTAction {
private:
bool check_base_classes_;
bool check_virtuals_in_implementations_;
+ bool check_url_directory_;
};
} // namespace
« no previous file with comments | « tools/clang/plugins/ChromeClassTester.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698