projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fb7c366
)
[clang-format] Fix MSVC "unsafe use of type 'bool' in operation" warning (NFC)
author
Yang Fan
<nullptr.cpp@gmail.com>
Wed, 3 Feb 2021 02:48:39 +0000
(10:48 +0800)
committer
Yang Fan
<nullptr.cpp@gmail.com>
Wed, 3 Feb 2021 02:50:59 +0000
(10:50 +0800)
MSVC warning:
```
\llvm-project\clang\lib\Format\BreakableToken.cpp(1002): warning C4804: '-': unsafe use of type 'bool' in operation
```
clang/lib/Format/BreakableToken.cpp
patch
|
blob
|
history
diff --git
a/clang/lib/Format/BreakableToken.cpp
b/clang/lib/Format/BreakableToken.cpp
index
4ac97ee
..
4559048
100644
(file)
--- 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);
}
}