[PATCH] [clang-tidy] Added -fix-errors option
    Manuel Klimek 
    klimek at google.com
       
    Sat Nov  1 04:16:03 PDT 2014
    
    
  
================
Comment at: clang-tidy/tool/ClangTidyMain.cpp:295-299
@@ +294,7 @@
+
+  const bool DisableFixes = Fix && FoundErrors && !FixErrors;
+  if (DisableFixes)
+    Fix = false;
+  else if (FixErrors)
+    Fix = true;
+
----------------
It seems strange to first have to compute DisableFixes based on FixErrors, and then use FixErrors again.
If we want FixErrors to imply Fix, why not have the if (FixErrors) Fix = true; before the whole block?
http://reviews.llvm.org/D6059
    
    
More information about the cfe-commits
mailing list