Author: Mike Rice
Date: 2024-03-23T17:53:29+01:00
New Revision: d7ce6b4d96c8879f38ba4cb5fdb1cc09d5b129e5

URL: 
https://github.com/llvm/llvm-project/commit/d7ce6b4d96c8879f38ba4cb5fdb1cc09d5b129e5
DIFF: 
https://github.com/llvm/llvm-project/commit/d7ce6b4d96c8879f38ba4cb5fdb1cc09d5b129e5.diff

LOG: [clang-tidy] Fix result check after overwriteChangedFiles() (#86360)

If any return from overwriteChangedFiles is true some fixes were not
applied.

Added: 
    

Modified: 
    clang-tools-extra/clang-tidy/ClangTidy.cpp

Removed: 
    


################################################################################
diff  --git a/clang-tools-extra/clang-tidy/ClangTidy.cpp 
b/clang-tools-extra/clang-tidy/ClangTidy.cpp
index 40ac6918faf407..b877ea06dc05cd 100644
--- a/clang-tools-extra/clang-tidy/ClangTidy.cpp
+++ b/clang-tools-extra/clang-tidy/ClangTidy.cpp
@@ -233,7 +233,7 @@ class ErrorReporter {
         if (!tooling::applyAllReplacements(Replacements.get(), Rewrite)) {
           llvm::errs() << "Can't apply replacements for file " << File << "\n";
         }
-        AnyNotWritten &= Rewrite.overwriteChangedFiles();
+        AnyNotWritten |= Rewrite.overwriteChangedFiles();
       }
 
       if (AnyNotWritten) {


        
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to