[PATCH] [clang-tidy] Added -fix-errors option

Alexander Kornienko alexfh at google.com
Sun Nov 2 20:42:27 PST 2014


================
Comment at: clang-tidy/tool/ClangTidyMain.cpp:300-301
@@ +299,4 @@
+  const bool DisableFixes = Fix && FoundErrors && !FixErrors;
+  if (DisableFixes)
+    Fix = false;
+
----------------
klimek wrote:
> Why don't we directly do llvm::errs() ...; here and skip the rest of the function (perhaps apart from the stat printing and profile checking)?
We need to call handleErrors to display the errors in any case. We also need to print the stats and profile data, and only then the message that fixes had not been applied.

http://reviews.llvm.org/D6059






More information about the cfe-commits mailing list