jdenny marked an inline comment as done. jdenny added inline comments.
================ Comment at: clang/lib/Sema/Sema.cpp:2108 void Sema::PushCapturedRegionScope(Scope *S, CapturedDecl *CD, RecordDecl *RD, CapturedRegionKind K) { + CapturedRegionScopeInfo *CSI = new CapturedRegionScopeInfo( ---------------- ABataev wrote: > I would suggest adding a new parameter for CapturedLevel and the same > parameter to `ActOnCapturedRegionStart` function. And pass the value for > `CapturedLevel` explicitly at `ActOnCapturedRegionStart` function call in > SemaOpenMP.cpp rather than rely on this solution. > Also, for each separate OpenMP directive, this counter must start from `0`. > Currently, I think, it may lead to crash if we have several directives. > Something like: > ``` > #pragma omp parallel > #pragma omp target teams > ... > ``` > I think it will work incorrectly for this example. I think the check that `OpenMPLevel` is the same prevents the problem you mention. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65835/new/ https://reviews.llvm.org/D65835 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits