Index: tools/gn/header_checker.cc |
diff --git a/tools/gn/header_checker.cc b/tools/gn/header_checker.cc |
index ada9d70da47fcaf0e250eb5f2806af0753cbd2e9..259f9f675ee2dbe26abb8a59802f9217fc6b8db7 100644 |
--- a/tools/gn/header_checker.cc |
+++ b/tools/gn/header_checker.cc |
@@ -298,14 +298,11 @@ bool HeaderChecker::CheckFile(const Target* from_target, |
} |
// If the file exists: |
-// - It must be in one or more dependencies of the given target. |
-// - Those dependencies must have visibility from the source file. |
-// - The header must be in the public section of those dependeices. |
-// - Those dependencies must either have no direct dependent configs with |
-// flags that affect the compiler, or those direct dependent configs apply |
-// to the "from_target" (it's one "hop" away). This ensures that if the |
-// include file needs needs compiler settings to compile it, that those |
-// settings are applied to the file including it. |
+// - The header must be in the public section of a target, or it must |
+// be in the sources with no public list (everything is implicitly public). |
+// - The dependency path to the included target must follow only public_deps. |
+// - If there are multiple targets with the header in it, only one need be |
+// valid for the check to pass. |
bool HeaderChecker::CheckInclude(const Target* from_target, |
const InputFile& source_file, |
const SourceFile& include_file, |