[PATCH] D17547: [OpenMP] Add support for multidimensional array sections in map clause SEMA.

Alexey Bataev via cfe-commits cfe-commits at lists.llvm.org
Wed Mar 2 22:58:55 PST 2016


ABataev added inline comments.

================
Comment at: lib/Sema/SemaOpenMP.cpp:9071
@@ +9070,3 @@
+/// 0 if it is inconclusive.
+static int CheckArrayExpressionReferToWholeSize(Sema &SemaRef, const Expr *E,
+                                                QualType BaseQTy) {
----------------
Don't use 'int' as a result of the functions, add enumeric and use it.

================
Comment at: lib/Sema/SemaOpenMP.cpp:9100-9102
@@ +9099,5 @@
+  // If we don't have a length we covering the whole dimension.
+  if (!Length) {
+    return 1;
+  }
+
----------------
Remove extra braces

================
Comment at: lib/Sema/SemaOpenMP.cpp:9127
@@ +9126,3 @@
+// if it is inconclusive.
+static int CheckArrayExpressionReferToUnitySize(Sema &SemaRef, const Expr *E,
+                                                QualType BaseQTy) {
----------------
Again, use enum as a return result

================
Comment at: lib/Sema/SemaOpenMP.cpp:9289-9291
@@ -9184,1 +9288,5 @@
+      if (CheckArrayExpressionReferToWholeSize(SemaRef, CurE, E->getType()) <
+          0) {
+        AllowWholeSizeArraySection = false;
+      }
       continue;
----------------
Extra braces


http://reviews.llvm.org/D17547





More information about the cfe-commits mailing list