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

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: be more explicit, per brettw 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..05b624cac2e77480b4b180e112ea071a6bbedf95 100644
--- a/tools/gn/header_checker.cc
+++ b/tools/gn/header_checker.cc
@@ -163,9 +163,11 @@ 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
+ // file_map_, which includes all known files; files only includes those
+ // being checked.
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