[clang] [clang-tools-extra] [Clang] [C2y] Implement N3355 ‘NamedLoops’ (PR #152870)

Shafik Yaghmour via cfe-commits cfe-commits at lists.llvm.org
Tue Aug 19 21:54:56 PDT 2025


================
@@ -3282,9 +3282,50 @@ static void CheckJumpOutOfSEHFinally(Sema &S, SourceLocation Loc,
   }
 }
 
-StmtResult
-Sema::ActOnContinueStmt(SourceLocation ContinueLoc, Scope *CurScope) {
-  Scope *S = CurScope->getContinueParent();
+Scope *FindLabeledBreakContinueScope(Sema &S, Scope *CurScope,
+                                     SourceLocation KWLoc, LabelDecl *Target,
+                                     SourceLocation LabelLoc, bool IsBreak) {
+  Scope *Found = nullptr;
+  for (Scope *Scope = CurScope; Scope; Scope = Scope->getParent()) {
+    if (Scope->isFunctionScope())
+      break;
+    if (Scope->isOpenACCComputeConstructScope()) {
+      S.Diag(KWLoc, diag::err_acc_branch_in_out_compute_construct)
+          << /*branch*/ 0 << /*out of */ 0;
----------------
shafik wrote:

```suggestion
          << /*branch*/ 0 << /*out of*/ 0;
```

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


More information about the cfe-commits mailing list