[PATCH] D15989: [OpenMP] Parsing + sema for "target enter data" and "target exit data" directives.

Alexey Bataev via cfe-commits cfe-commits at lists.llvm.org
Sun Jan 17 21:17:46 PST 2016


ABataev added inline comments.

================
Comment at: include/clang/Sema/Sema.h:7767-7768
@@ -7766,2 +7766,4 @@
                                         bool StrictlyPositive = true);
+  /// \brief Check for existence of a map clause
+  bool HasMapClause(ArrayRef<OMPClause *> Clauses);
 
----------------
I don't think it must be exposed as a member of Sema. It is enough just to make it static in SemaOpenMP.cpp

================
Comment at: lib/Parse/ParseOpenMP.cpp:175
@@ -164,3 +174,3 @@
 ///         'taskgroup' | 'teams' | 'taskloop' | 'taskloop simd' {clause} |
-///         'distribute'
+///         'distribute' | 'target enter data' | 'target exit data'
 ///         annot_pragma_openmp_end
----------------
'target exit data' is not supported in this patch

================
Comment at: lib/Sema/SemaOpenMP.cpp:5929-5931
@@ +5928,5 @@
+       I != E; ++I) {
+    if (*I) {
+      OMPClause *Clause = *I;
+      if (Clause->getClauseKind() == OMPC_map)
+        return true;
----------------
just if(*I != nullptr && (*I)->getClauseKind() == OMPC_map)

================
Comment at: lib/Sema/SemaOpenMP.cpp:8525
@@ +8524,3 @@
+          // TODO: Need to determine if map type is implicitly determined
+          (0) <<
+          getOpenMPSimpleClauseTypeName(OMPC_map, MapType) <<
----------------
Remove parens around 0


http://reviews.llvm.org/D15989





More information about the cfe-commits mailing list