[PATCH] D22785: [OpenMP] diagnose orphaned teams construct
Alexey Bataev via cfe-commits
cfe-commits at lists.llvm.org
Mon Jul 25 20:00:22 PDT 2016
ABataev accepted this revision.
ABataev added a comment.
This revision is now accepted and ready to land.
LG with a nit
================
Comment at: lib/Sema/SemaOpenMP.cpp:3360-3366
@@ -3356,5 +3359,9 @@
if (NestingProhibited) {
- SemaRef.Diag(StartLoc, diag::err_omp_prohibited_region)
- << CloseNesting << getOpenMPDirectiveName(OffendingRegion)
- << Recommend << getOpenMPDirectiveName(CurrentRegion);
+ if (OrphanSeen)
+ SemaRef.Diag(StartLoc, diag::err_omp_orphaned_device_directive)
+ << getOpenMPDirectiveName(CurrentRegion) << Recommend;
+ else
+ SemaRef.Diag(StartLoc, diag::err_omp_prohibited_region)
+ << CloseNesting << getOpenMPDirectiveName(OffendingRegion)
+ << Recommend << getOpenMPDirectiveName(CurrentRegion);
return true;
----------------
Please, enclose multiline sub-statements of 'if' statement into braces.
https://reviews.llvm.org/D22785
More information about the cfe-commits
mailing list