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/ChromeClassTester.cpp

Issue 7980045: style plugin: Don't ignore style warnings on the linux clang trybots. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 3 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/clang/plugins/ChromeClassTester.cpp
diff --git a/tools/clang/plugins/ChromeClassTester.cpp b/tools/clang/plugins/ChromeClassTester.cpp
index 927c65593ce676dc125f8d0670e40f3b0a392833..30a5010aa874216ce559a114d02e0bbee3761d42 100644
--- a/tools/clang/plugins/ChromeClassTester.cpp
+++ b/tools/clang/plugins/ChromeClassTester.cpp
@@ -54,7 +54,6 @@ void ChromeClassTester::BuildBannedLists() {
banned_directories_.push_back("llvm/");
banned_directories_.push_back("ninja/");
banned_directories_.push_back("xcodebuild/");
- banned_directories_.push_back("clang/");
// You are standing in a mazy of twisty dependencies, all resolved by
// putting everything in the header.
@@ -233,8 +232,14 @@ bool ChromeClassTester::InBannedDirectory(SourceLocation loc) {
it != banned_directories_.end(); ++it) {
// If we can find any of the banned path components in this path, then
// this file is rejected.
- if (b.find(*it) != std::string::npos)
- return true;
+ size_t index = b.find(*it);
+ if (index != std::string::npos) {
+ bool matches_full_dir_name = index == 0 || b[index - 1] == '/';
+ if ((*it)[0] == '/')
+ matches_full_dir_name = true;
+ if (matches_full_dir_name)
+ return true;
+ }
}
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698