steveire added inline comments.

================
Comment at: clang-tools-extra/clang-tidy/zircon/NoStdNamespaceCheck.cpp:52
+  Finder->addMatcher(
+      valueDecl(hasType(decl(hasDeclContext(namespaceDecl(isStdNamespace())))))
+          .bind("stdVar"),
----------------
Recommend extracting `namespaceDecl(isStdNamespace())` to a local variable.


================
Comment at: clang-tools-extra/test/clang-tidy/zircon-no-std-namespace.cpp:13
+int b = func();
+std_int c;
+// CHECK-MESSAGES: :[[@LINE-1]]:1: warning: use of the 'std' namespace is not 
allowed in Zircon kernel code
----------------
Are you sure it's wise to warn on every declaration inside the `std` namespace? 
Surely warning only on declarations outside it is enough.


https://reviews.llvm.org/D53882



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to