[llvm-branch-commits] [clang] [Clang] [C++26] Expansion Statements (Part 9: Control Flow) (PR #169688)
via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Thu Jul 9 19:51:54 PDT 2026
================
@@ -1196,8 +1221,9 @@ StmtResult Sema::ActOnStartOfSwitchStmt(SourceLocation SwitchLoc,
auto *SS = SwitchStmt::Create(Context, InitStmt, Cond.get().first, CondExpr,
LParenLoc, RParenLoc);
+ SS->setSwitchLoc(SwitchLoc);
----------------
Sirraide wrote:
We want to be able to point to the switch statement in a diagnostic before we’re done parsing the body, so I moved setting the location here rather than doing that as part of the call to `SS->setBody()` in `ActOnFinishSwitchStmt()`
https://github.com/llvm/llvm-project/pull/169688
More information about the llvm-branch-commits
mailing list