[clang] f24c1dd - Fix MSVC "signed/unsigned mismatch" warning. NFC.
Simon Pilgrim via cfe-commits
cfe-commits at lists.llvm.org
Fri Oct 25 10:11:44 PDT 2024
Author: Simon Pilgrim
Date: 2024-10-25T18:11:28+01:00
New Revision: f24c1dd08ea71fa7334a85fd2772c2f728de0c56
URL: https://github.com/llvm/llvm-project/commit/f24c1dd08ea71fa7334a85fd2772c2f728de0c56
DIFF: https://github.com/llvm/llvm-project/commit/f24c1dd08ea71fa7334a85fd2772c2f728de0c56.diff
LOG: Fix MSVC "signed/unsigned mismatch" warning. NFC.
Added:
Modified:
clang/tools/clang-format/ClangFormat.cpp
Removed:
################################################################################
diff --git a/clang/tools/clang-format/ClangFormat.cpp b/clang/tools/clang-format/ClangFormat.cpp
index 96fb85e99bf5f0..5522d05744a2b4 100644
--- a/clang/tools/clang-format/ClangFormat.cpp
+++ b/clang/tools/clang-format/ClangFormat.cpp
@@ -510,7 +510,7 @@ static bool format(StringRef FileName, bool ErrorOnIncompleteFormat = false) {
reformat(*FormatStyle, *ChangedCode, Ranges, AssumedFileName, &Status);
Replaces = Replaces.merge(FormatChanges);
if (DryRun) {
- return Replaces.size() > (IsJson ? 1 : 0) &&
+ return Replaces.size() > (IsJson ? 1u : 0u) &&
emitReplacementWarnings(Replaces, AssumedFileName, Code);
}
if (OutputXML) {
More information about the cfe-commits
mailing list