[PATCH] D57690: [OPENMP] issue error messages for multiple teams contructs in a target constructs

Kelvin Li via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Feb 4 12:32:26 PST 2019


kkwli0 marked 2 inline comments as done.
kkwli0 added inline comments.


================
Comment at: clang/lib/Sema/SemaOpenMP.cpp:7070
         const auto *OED = dyn_cast<OMPExecutableDirective>(*I);
-        if (!OED || !isOpenMPTeamsDirective(OED->getDirectiveKind())) {
+        if (!OED || !isOpenMPTeamsDirective(OED->getDirectiveKind()) ||
+            (isOpenMPTeamsDirective(OED->getDirectiveKind()) &&
----------------
ABataev wrote:
> just `if (!OED || !isOpenMPTeamsDirective(OED->getDirectiveKind() || OMPTeamsFound)`
Yep, it simplifies the logic.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D57690/new/

https://reviews.llvm.org/D57690





More information about the cfe-commits mailing list