[clang] [Clang] use colon char instead of token name (PR #144068)

Mariya Podchishchaeva via cfe-commits cfe-commits at lists.llvm.org
Fri Jun 13 06:04:42 PDT 2025


================
@@ -836,8 +836,7 @@ StmtResult Parser::ParseCaseStatement(ParsedStmtContext StmtCtx,
 
       Diag(ExpectedLoc, diag::err_expected_after)
           << "'case'" << tok::colon
-          << FixItHint::CreateInsertion(ExpectedLoc,
-                                        tok::getTokenName(tok::colon));
+          << FixItHint::CreateInsertion(ExpectedLoc, ":");
----------------
Fznamznon wrote:

Maybe
```suggestion
          << FixItHint::CreateInsertion(ExpectedLoc, tok::getPunctuatorSpelling(tok::colon));
```

https://github.com/llvm/llvm-project/pull/144068


More information about the cfe-commits mailing list