[PATCH] D21617: [OpenMP] Diagnose missing cases of statements between target and teams directives

Alexey Bataev via cfe-commits cfe-commits at lists.llvm.org
Wed Jun 22 21:20:47 PDT 2016


ABataev accepted this revision.
ABataev added a comment.
This revision is now accepted and ready to land.

LG with a small nit


================
Comment at: lib/Sema/SemaOpenMP.cpp:6384-6386
@@ -6383,1 +6383,5 @@
+    } else {
+      auto *OED = dyn_cast<OMPExecutableDirective>(S);
+      if (!OED || !isOpenMPTeamsDirective(OED->getDirectiveKind()))
+        OMPTeamsFound = false;
     }
----------------
I'd prefer something like this:
```
auto *OED = dyn_cast<OMPExecutableDirective>(S);
OMPTeamsFound = OED && isOpenMPTeamsDirective(OED->getDirectiveKind());
```


http://reviews.llvm.org/D21617





More information about the cfe-commits mailing list