[PATCH] D141528: [Clang][OpenMP] Fix loop directive nested inside a parallel

Alexey Bataev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jan 11 11:49:55 PST 2023


ABataev added inline comments.


================
Comment at: clang/lib/CodeGen/CGStmtOpenMP.cpp:7865
+    const Stmt *CS = cast<CapturedStmt>(S.getAssociatedStmt())->getCapturedStmt();
+    if (CS->getStmtClass() == Stmt::ForStmtClass) {
+      const ForStmt &ForS = cast<ForStmt>(*CS);
----------------
```
if (const auto *ForS = dyn_cast<ForStmt>(CS); !ForS || !isa<DeclStmt>(ForS->getInit())) {
... 
} else {
  CGF.EmitStmt(CS);
}
```


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D141528/new/

https://reviews.llvm.org/D141528



More information about the cfe-commits mailing list