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

Manuel Klimek klimek at google.com
Sun Nov 2 21:01:09 PST 2014


lg

================
Comment at: clang-tidy/tool/ClangTidyMain.cpp:300-301
@@ +299,4 @@
+  const bool DisableFixes = Fix && FoundErrors && !FixErrors;
+  if (DisableFixes)
+    Fix = false;
+
----------------
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...

http://reviews.llvm.org/D6059






More information about the cfe-commits mailing list