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

Alexander Kornienko alexfh at google.com
Mon Nov 3 06:37:45 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:
> alexfh wrote:
> > 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.
> Ok, then I'd optionally do Fix && !DisableFixes below instead of using the flag like a global variable...
Done. Committed.


More information about the cfe-commits mailing list