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

Alexander Kornienko alexfh at google.com
Wed Jul 16 05:19:51 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"))
----------------
Benjamin Kramer wrote:
> 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?
Not yet. I meant, that we should do this in general, not necessarily now. Sorry for ambiguous language.

http://reviews.llvm.org/D4523






More information about the cfe-commits mailing list