[PATCH] D24615: [OpenMP] clang doesnt diagnose if there is a lexical block around a for stmt for OpenMP loops. It is technically not allowed in the OpenMP standard
Alexey Bataev via cfe-commits
cfe-commits at lists.llvm.org
Thu Sep 15 23:13:52 PDT 2016
ABataev added inline comments.
================
Comment at: lib/Sema/SemaOpenMP.cpp:5137-5138
@@ -5137,1 +5136,4 @@
+ Stmt *CurStmt = AStmt;
+ if (auto CapS = dyn_cast_or_null<CapturedStmt>(CurStmt))
+ CurStmt = CapS->getCapturedStmt();
for (unsigned Cnt = 0; Cnt < NestedLoopCount; ++Cnt) {
----------------
You also should skip all AttributedStmts.
https://reviews.llvm.org/D24615
More information about the cfe-commits
mailing list