[clang] [Clang] use colon char instead of token name (PR #144068)
via cfe-commits
cfe-commits at lists.llvm.org
Fri Jun 13 05:53:14 PDT 2025
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-clang
Author: Oleksandr T. (a-tarasyuk)
<details>
<summary>Changes</summary>
Fixes regression of https://github.com/llvm/llvm-project/pull/143460/files#r2144925614
---
Full diff: https://github.com/llvm/llvm-project/pull/144068.diff
1 Files Affected:
- (modified) clang/lib/Parse/ParseStmt.cpp (+1-2)
``````````diff
diff --git a/clang/lib/Parse/ParseStmt.cpp b/clang/lib/Parse/ParseStmt.cpp
index c00759893b0c4..eb761c3b90523 100644
--- a/clang/lib/Parse/ParseStmt.cpp
+++ b/clang/lib/Parse/ParseStmt.cpp
@@ -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, ":");
ColonLoc = ExpectedLoc;
}
``````````
</details>
https://github.com/llvm/llvm-project/pull/144068
More information about the cfe-commits
mailing list