Add explicit braces to silence warning about ambiguous 'else' inside the EXPECT_EQ macro. NFCI.

This commit is contained in:
Simon Pilgrim 2021-06-09 18:19:49 +01:00
parent 4eb47e3cd4
commit 0ce61d47c0
1 changed files with 3 additions and 2 deletions

View File

@ -659,10 +659,11 @@ TEST(SelectionTest, CreateAll) {
AST.getASTContext(), AST.getTokens(), Test.point("ambiguous"),
Test.point("ambiguous"), [&](SelectionTree T) {
// Expect to see the right-biased tree first.
if (Seen == 0)
if (Seen == 0) {
EXPECT_EQ("BinaryOperator", nodeKind(T.commonAncestor()));
else if (Seen == 1)
} else if (Seen == 1) {
EXPECT_EQ("IntegerLiteral", nodeKind(T.commonAncestor()));
}
++Seen;
return false;
});