[PATCH] D58074: [OpenMP 5.0] Parsing/sema support for map clause with mapper modifier

Kelvin Li via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Feb 12 11:24:22 PST 2019


kkwli0 added inline comments.


================
Comment at: include/clang/AST/OpenMPClause.h:4077
 
+  /// C++ nested name specifier for the assoicated user-defined mapper.
+  NestedNameSpecifierLoc MapperQualifierLoc;
----------------
assoicated -> associated


================
Comment at: include/clang/AST/OpenMPClause.h:4212
+    assert(DMDs.size() == varlist_size() &&
+           "Unexpected amount of user-defined mappers.");
+    std::copy(DMDs.begin(), DMDs.end(), getUDMapperRefs().begin());
----------------
amount -> number?


================
Comment at: include/clang/AST/OpenMPClause.h:4229
   /// \param MapModifiersLoc Location of map-type-modifiers.
+  /// \param UDMQualifierLoc C++ nested name specifier for the assoicated
+  /// user-defined mapper.
----------------
assoicated -> associated


================
Comment at: lib/Parse/ParseOpenMP.cpp:2144
+        parseMapType(*this, Data);
     }
     if (Data.MapType == OMPC_MAP_unknown) {
----------------
Although it is an error situation, will we have different behavior?

```
... map(xclose, to: x)
```

Previously, it always parses both modifier and type.  After the change, the call of `parseMapType` is skipped.  If it `OMPC_MAP_unknown`, `IsMapTypeImplicit` is set.


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

https://reviews.llvm.org/D58074





More information about the cfe-commits mailing list