[PATCH] D22075: [OpenMP] Fix incorrect diagnostics in map clause

Samuel Antao via cfe-commits cfe-commits at lists.llvm.org
Wed Jul 6 17:52:31 PDT 2016


sfantao added a comment.

Hi David,

Thanks for the fix!


================
Comment at: lib/Sema/SemaOpenMP.cpp:10639
@@ -10638,2 +10638,3 @@
             break;
         }
+        while(SI != SE) {
----------------
You have to document what you are trying to accomplish here, something like `"Check if the extra components of the expressions in the enclosing data environment are redundant for the current base declaration. If they are, the maps completely overlap, which is legal."`

You may add the snippet in that comment so that we can refer to that when trying to understand this code.

================
Comment at: lib/Sema/SemaOpenMP.cpp:10654
@@ +10653,3 @@
+               SI->getAssociatedExpression(),Type))
+            ++SI;
+          else
----------------
I'd rather use a `for` loop, move the iterator increment there, and invert the sense of this last `if` statement to break the loop.


http://reviews.llvm.org/D22075





More information about the cfe-commits mailing list