[clang] [clang] Mark labels referenced when used in named break or continue (PR #166033)
via cfe-commits
cfe-commits at lists.llvm.org
Mon Nov 3 17:56:04 PST 2025
================
@@ -3281,6 +3281,10 @@ static Scope *FindLabeledBreakContinueScope(Sema &S, Scope *CurScope,
SourceLocation LabelLoc,
bool IsContinue) {
assert(Target && "not a named break/continue?");
+
+ S.MarkAnyDeclReferenced(Target->getLocation(), Target,
+ /*MightBeOdrUse=*/false);
----------------
Sirraide wrote:
```suggestion
Target->markUsed(S.Context);
```
https://github.com/llvm/llvm-project/pull/166033
More information about the cfe-commits
mailing list