[PATCH] Add flag --enable-check-profile to clang-tidy.

Alexander Kornienko alexfh at google.com
Thu Oct 23 07:55:48 PDT 2014


Looks good modulo comments.

That's really awesome!

================
Comment at: clang-tidy/ClangTidy.cpp:220
@@ +219,3 @@
+  ast_matchers::MatchFinder::MatchFinderOptions FinderOptions;
+  if (auto *P = Context.getCheckProfileData()) {
+    FinderOptions.CheckProfiling.emplace(P->Records);
----------------
nit: No braces around single-statement if bodies in LLVM style.

================
Comment at: clang-tidy/ClangTidyDiagnosticConsumer.h:198
@@ -183,1 +197,3 @@
 
+  llvm::StringMap<llvm::TimeRecord> CheckProfileData;
+
----------------
Unused?

================
Comment at: clang-tidy/tool/ClangTidyMain.cpp:287
@@ -239,1 +286,3 @@
   printStats(Stats);
+  if (EnableCheckProfile) printProfileData(Profile, llvm::errs());
+
----------------
nit: Move the if body to the next line.

http://reviews.llvm.org/D5937






More information about the cfe-commits mailing list