google-global-names-in-headers flags global namespace pollution in header files.
Right now it only triggers on using declarations and directives.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
Comment Actions
Looks good modulo comments. Thanks!
clang-tidy/google/GlobalNamesInHeadersCheck.cpp | ||
---|---|---|
31 ↗ | (On Diff #19756) | nit: const auto*? |
36 ↗ | (On Diff #19756) | nit: I'd put ellipsis in the end of the comment to avoid confusion. |
43 ↗ | (On Diff #19756) | nit: No braces needed in the LLVM style. |
49 ↗ | (On Diff #19756) | The message reads as if clang-tidy didn't find the aforementioned using declaration and wants you to insert one. Maybe "using declarations in the global namespace in headers are prohibited" or something similar? I'd even go with "don't use using declarations in ...", it's an error message, not a novel after all ;) |