Fixed processing of the CapturedStmt children to fix the crash of the
OpenMP constructs during analysis.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@366357
91177308-0d34-0410-b5e6-
96231b3b80d8
}
break;
}
+ case Stmt::CapturedStmtClass:
+ for (Stmt *SubStmt : S->children()) {
+ if (SubStmt) {
+ M[SubStmt] = S;
+ BuildParentMap(M, SubStmt, OVMode);
+ }
+ }
+ if (Stmt *SubStmt = cast<CapturedStmt>(S)->getCapturedStmt()) {
+ M[SubStmt] = S;
+ BuildParentMap(M, SubStmt, OVMode);
+ }
+ break;
default:
for (Stmt *SubStmt : S->children()) {
if (SubStmt) {
void openmp_parallel_crash_test() {
#pragma omp parallel
;
+#pragma omp parallel for
+ for (int i = 0; i < 8; ++i)
+ for (int j = 0, k = 0; j < 8; ++j)
+ ;
}