Skip to content

Commit b908123

Browse files
committed
[clang-format][NFC] Minor cleanup of token annotator and test cases
1 parent 26f9e49 commit b908123

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

clang/lib/Format/TokenAnnotator.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ class AnnotatingParser {
137137
bool parseAngle() {
138138
if (!CurrentToken || !CurrentToken->Previous)
139139
return false;
140-
if (NonTemplateLess.count(CurrentToken->Previous))
140+
if (NonTemplateLess.count(CurrentToken->Previous) > 0)
141141
return false;
142142

143143
const FormatToken &Previous = *CurrentToken->Previous; // The '<'.

clang/unittests/Format/FormatTest.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10656,8 +10656,8 @@ TEST_F(FormatTest, UnderstandsTemplateParameters) {
1065610656
verifyFormat("f(aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\n"
1065710657
" .template operator()<A>());",
1065810658
getLLVMStyleWithColumns(35));
10659-
verifyFormat("bool_constant<a && noexcept(f())>");
10660-
verifyFormat("bool_constant<a || noexcept(f())>");
10659+
verifyFormat("bool_constant<a && noexcept(f())>;");
10660+
verifyFormat("bool_constant<a || noexcept(f())>;");
1066110661

1066210662
verifyFormat("if (std::tuple_size_v<T> > 0)");
1066310663

0 commit comments

Comments
 (0)