Add 'included from' details to warning message to google-global-names-in-headers.
It should make it clearer on those cases where a non-header is being mistakenly #included.
Details
- Reviewers
alexfh
Diff Detail
Event Timeline
clang-tidy/google/GlobalNamesInHeadersCheck.cpp | ||
---|---|---|
49 | Static functions are preferred in LLVM. http://llvm.org/docs/CodingStandards.html#anonymous-namespaces "make anonymous namespaces as small as possible, and only use them for class declarations. " | |
96 | It's more common to present this kind of additional information as notes. As a bonus, the location of the note can point to the #include directive, which will make the whole diagnostic more useful. Also, we might want to figure out why clang-tidy doesn't print "in file included from ..." itself, as clang does (but until then we can have this hand-rolled implementation). |
Static functions are preferred in LLVM. http://llvm.org/docs/CodingStandards.html#anonymous-namespaces
"make anonymous namespaces as small as possible, and only use them for class declarations. "