[clang] [llvm] [Clang][OpenMP] Support for dispatch construct (Sema & Codegen) support (PR #131838)

Alexey Bataev via cfe-commits cfe-commits at lists.llvm.org
Wed Apr 30 06:29:25 PDT 2025


================
@@ -10554,6 +10687,8 @@ SemaOpenMP::ActOnOpenMPDispatchDirective(ArrayRef<OMPClause *> Clauses,
     return StmtError();
 
   Stmt *S = cast<CapturedStmt>(AStmt)->getCapturedStmt();
+  if (isa<CapturedStmt>(S))
+    S = cast<CapturedStmt>(S)->getCapturedStmt();
----------------
alexey-bataev wrote:

```suggestion
  if (auto *CS = dyn_cast<CapturedStmt>(S))
    S = CS->getCapturedStmt();
```


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


More information about the cfe-commits mailing list