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; |