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

Unified Diff: tools/gn/header_checker.cc

Issue 1479313002: GN: Use all targets to determine whether a file is generated (for `check`). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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/gn/header_checker.cc
diff --git a/tools/gn/header_checker.cc b/tools/gn/header_checker.cc
index b15b4fa16b2b88aaf91d57426adf8a225c6f9a0d..72cc6e2426f45d6b97bfb1aa99e79261bab470bc 100644
--- a/tools/gn/header_checker.cc
+++ b/tools/gn/header_checker.cc
@@ -163,9 +163,10 @@ void HeaderChecker::RunCheckOverFiles(const FileMap& files, bool force_check) {
type != SOURCE_M && type != SOURCE_MM && type != SOURCE_RC)
continue;
- // If any target marks it as generated, don't check it.
+ // If any target marks it as generated, don't check it. We have to check
+ // the file map which includes all targets, not just those being checked.
brettw 2015/11/28 17:51:33 CAn you be explicit in the comment here that 'file
jbroman 2015/11/30 15:25:05 Done.
bool is_generated = false;
- for (const auto& vect_i : file.second)
+ for (const auto& vect_i : file_map_[file.first])
is_generated |= vect_i.is_generated;
if (is_generated)
continue;
« 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