================
@@ -832,10 +832,13 @@ StmtResult Parser::ParseCaseStatement(ParsedStmtContext
StmtCtx,
<< "'case'" << tok::colon
<< FixItHint::CreateReplacement(ColonLoc, ":");
} else {
- SourceLocation ExpectedLoc = PP.getLocForEndOfToken(PrevTokLocation);
+ SourceLocation ExpectedLoc = getEndOfPreviousToken();
+
Diag(ExpectedLoc, diag::err_expected_after)
<< "'case'" << tok::colon
- << FixItHint::CreateInsertion(ExpectedLoc, ":");
+ << FixItHint::CreateInsertion(ExpectedLoc,
+ tok::getTokenName(tok::colon));
----------------
a-tarasyuk wrote:
@rkirsling I’ll check and fit it today. Thanks
https://github.com/llvm/llvm-project/pull/143460
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits