Author: d0k Date: Thu Aug 20 04:47:06 2015 New Revision: 245548 URL: http://llvm.org/viewvc/llvm-project?rev=245548&view=rev Log: [clang-tidy] Fold the meat of the UseNullPtrCheck into an anonymous namespace.
While convenient, RecursiveASTVisitor generates a ridiculous amount of dead template code. Making it not visible from the outside lets the compiler eliminate some of it, shrinking clang-tidy by ~140k. Modified: clang-tools-extra/trunk/clang-tidy/modernize/UseNullptrCheck.cpp Modified: clang-tools-extra/trunk/clang-tidy/modernize/UseNullptrCheck.cpp URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clang-tidy/modernize/UseNullptrCheck.cpp?rev=245548&r1=245547&r2=245548&view=diff ============================================================================== --- clang-tools-extra/trunk/clang-tidy/modernize/UseNullptrCheck.cpp (original) +++ clang-tools-extra/trunk/clang-tidy/modernize/UseNullptrCheck.cpp Thu Aug 20 04:47:06 2015 @@ -20,6 +20,7 @@ using namespace llvm; namespace clang { namespace tidy { namespace modernize { +namespace { const char CastSequence[] = "sequence"; @@ -438,6 +439,7 @@ private: Expr *FirstSubExpr; bool PruneSubtree; }; +} // namespace UseNullptrCheck::UseNullptrCheck(StringRef Name, ClangTidyContext *Context) : ClangTidyCheck(Name, Context), _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits