Prazek added inline comments. ================ Comment at: clang-tidy/misc/GlobalNamespaceCheck.cpp:46 @@ +45,3 @@ + // extern "C" globals need to be in the global namespace. + if (VDecl->isExternC()) + return; ---------------- I think it would be better to check it in matcher. I see that there is isExternC, but it only works for FunctionDecl, but I think that adding isExternC for VarDecl would be good
================ Comment at: clang-tidy/misc/GlobalNamespaceCheck.cpp:67 @@ +66,3 @@ + } + + // FIXME: If we want to be really fancy we could move declaration-less ---------------- What about macros? I think you should check isMacroId on location here (don't do fixit when it is in macro, but print warning) Also please add tests for it. Repository: rL LLVM https://reviews.llvm.org/D23130 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits