alexfh added inline comments. ================ Comment at: clang-tidy/google/GlobalNamesInHeadersCheck.cpp:49 @@ -48,1 +48,3 @@ +namespace { +std::string getIncludeFromMessage(SourceLocation DeclLoc, ---------------- 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. " ================ Comment at: clang-tidy/google/GlobalNamesInHeadersCheck.cpp:96 @@ -74,2 +95,3 @@ diag(D->getLocStart(), - "using declarations in the global namespace in headers are prohibited"); + "using declarations in the global namespace in headers are prohibited%0") + << IncludeMessage; ---------------- 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). http://reviews.llvm.org/D21815 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits