Author: Yang Fan
Date: 2021-02-03T10:50:59+08:00
New Revision: ad50c8633321a2a76b6e49daf57c7eaea4494536

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

LOG: [clang-format] Fix MSVC "unsafe use of type 'bool' in operation" warning 
(NFC)

MSVC warning:
```
\llvm-project\clang\lib\Format\BreakableToken.cpp(1002): warning C4804: '-': 
unsafe use of type 'bool' in operation
```

Added: 
    

Modified: 
    clang/lib/Format/BreakableToken.cpp

Removed: 
    


################################################################################
diff  --git a/clang/lib/Format/BreakableToken.cpp 
b/clang/lib/Format/BreakableToken.cpp
index 4ac97ee2e45a..455904895848 100644
--- a/clang/lib/Format/BreakableToken.cpp
+++ b/clang/lib/Format/BreakableToken.cpp
@@ -999,7 +999,7 @@ void BreakableLineCommentSection::adaptStartOfLine(
     const auto SpacesToAdd = std::max(PrefixSpaceChange[LineIndex], 0);
     Whitespaces.replaceWhitespaceInToken(
         tokenAt(LineIndex), OriginalPrefix[LineIndex].size() - SpacesToRemove,
-        /*ReplaceChars=*/SpacesToRemove, "", "", -/*InPPDirective=*/false,
+        /*ReplaceChars=*/SpacesToRemove, "", "", /*InPPDirective=*/false,
         /*Newlines=*/0, /*Spaces=*/SpacesToAdd);
   }
 }


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

Reply via email to