================
Comment at: clang-tidy/google/GlobalNamesInHeadersCheck.cpp:31
@@ +30,3 @@
+void GlobalNamesInHeadersCheck::check(const MatchFinder::MatchResult &Result) {
+  auto *D = Result.Nodes.getNodeAs<Decl>("using_decl");
+  // If it comes from a macro, we'll assume it is fine.
----------------
alexfh wrote:
> nit: const auto*?
Done

================
Comment at: clang-tidy/google/GlobalNamesInHeadersCheck.cpp:36
@@ +35,3 @@
+
+  // Ignore if it comes from the "main" file
+  if (Result.SourceManager->isInMainFile(
----------------
alexfh wrote:
> nit: I'd put ellipsis in the end of the comment to avoid confusion.
Done.

================
Comment at: clang-tidy/google/GlobalNamesInHeadersCheck.cpp:43
@@ +42,3 @@
+
+    if (!Filename.endswith(".h")) {
+      return;
----------------
alexfh wrote:
> nit: No braces needed in the LLVM style.
Done.

================
Comment at: clang-tidy/google/GlobalNamesInHeadersCheck.cpp:49
@@ +48,3 @@
+  diag(D->getLocStart(),
+       "no using declarations in the global namespace in headers");
+}
----------------
alexfh wrote:
> 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 ;)
Done.

http://reviews.llvm.org/D7563

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/



_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to