[PATCH] D54638: [OpenMP] remove redundant MapTypeModifierSpecified flag in ParseOpenMP.cpp (NFC)

Phabricator via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Nov 21 11:41:40 PST 2018


This revision was automatically updated to reflect the committed changes.
Closed by commit rL347408: [OPENMP] remove redundant MapTypeModifierSpecified flag in ParseOpenMP.cpp (NFC) (authored by kli, committed by ).
Herald added a subscriber: llvm-commits.

Changed prior to commit:
  https://reviews.llvm.org/D54638?vs=174396&id=174957#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D54638

Files:
  cfe/trunk/lib/Parse/ParseOpenMP.cpp


Index: cfe/trunk/lib/Parse/ParseOpenMP.cpp
===================================================================
--- cfe/trunk/lib/Parse/ParseOpenMP.cpp
+++ cfe/trunk/lib/Parse/ParseOpenMP.cpp
@@ -1775,7 +1775,6 @@
                                 OpenMPVarListDataTy &Data) {
   UnqualifiedId UnqualifiedReductionId;
   bool InvalidReductionId = false;
-  bool MapTypeModifierSpecified = false;
 
   // Parse '('.
   BalancedDelimiterTracker T(*this, tok::l_paren, tok::annot_pragma_openmp_end);
@@ -1878,8 +1877,6 @@
           if (Data.MapTypeModifier != OMPC_MAP_always) {
             Diag(Tok, diag::err_omp_unknown_map_type_modifier);
             Data.MapTypeModifier = OMPC_MAP_unknown;
-          } else {
-            MapTypeModifierSpecified = true;
           }
 
           ConsumeToken();
@@ -1904,8 +1901,6 @@
           if (Data.MapTypeModifier != OMPC_MAP_always) {
             Diag(Tok, diag::err_omp_unknown_map_type_modifier);
             Data.MapTypeModifier = OMPC_MAP_unknown;
-          } else {
-            MapTypeModifierSpecified = true;
           }
 
           ConsumeToken();
@@ -1942,9 +1937,7 @@
       (Kind != OMPC_reduction && Kind != OMPC_task_reduction &&
        Kind != OMPC_in_reduction && Kind != OMPC_depend && Kind != OMPC_map) ||
       (Kind == OMPC_reduction && !InvalidReductionId) ||
-      (Kind == OMPC_map && Data.MapType != OMPC_MAP_unknown &&
-       (!MapTypeModifierSpecified ||
-        Data.MapTypeModifier == OMPC_MAP_always)) ||
+      (Kind == OMPC_map && Data.MapType != OMPC_MAP_unknown) ||
       (Kind == OMPC_depend && Data.DepKind != OMPC_DEPEND_unknown);
   const bool MayHaveTail = (Kind == OMPC_linear || Kind == OMPC_aligned);
   while (IsComma || (Tok.isNot(tok::r_paren) && Tok.isNot(tok::colon) &&


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D54638.174957.patch
Type: text/x-patch
Size: 1774 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20181121/decd5bac/attachment.bin>


More information about the cfe-commits mailing list