Skip to content

Commit be121c5

Browse files
committed
[Clang] Fix fix-it hint regression from llvm#143460
`:` began displaying as `colon` in the fix-it hint for a `case` with a missing colon.
1 parent 4236423 commit be121c5

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

clang/lib/Parse/ParseStmt.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -836,8 +836,7 @@ StmtResult Parser::ParseCaseStatement(ParsedStmtContext StmtCtx,
836836

837837
Diag(ExpectedLoc, diag::err_expected_after)
838838
<< "'case'" << tok::colon
839-
<< FixItHint::CreateInsertion(ExpectedLoc,
840-
tok::getTokenName(tok::colon));
839+
<< FixItHint::CreateInsertion(ExpectedLoc, ":");
841840

842841
ColonLoc = ExpectedLoc;
843842
}

0 commit comments

Comments
 (0)