[PATCH] [clang-tidy] Add a namespace checker.

Benjamin Kramer benny.kra at gmail.com
Wed Jul 16 04:37:03 PDT 2014


================
Comment at: clang-tidy/google/UnnamedNamespaceInHeaderCheck.cpp:41
@@ +40,3 @@
+    StringRef FileName = SM->getPresumedLoc(Loc).getFilename();
+    if (FileName.endswith(".h") || FileName.endswith(".hh") ||
+        FileName.endswith(".hpp") || FileName.endswith(".hxx"))
----------------
Alexander Kornienko wrote:
> The list of header file extensions may be a good candidate for being stored in ClangTidyOptions, so we can configure it when needed.
Hmm, we don't have a way of accessing ClangTidyOptions from within a checker?

http://reviews.llvm.org/D4523






More information about the cfe-commits mailing list