[PATCH] D67978: [OpenMP 5.0] Fix user-defined mapper lookup in sema

Lingda Li via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Sep 26 11:32:26 PDT 2019


lildmh marked an inline comment as done.
lildmh added inline comments.


================
Comment at: lib/Sema/SemaOpenMP.cpp:14805
+  if (!Type->isStructureOrClassType() && !Type->isUnionType() &&
+      (MapperIdScopeSpec.isSet() || MapperId.getAsString() != "default")) {
+    SemaRef.Diag(Loc, diag::err_omp_mapper_wrong_type);
----------------
ABataev wrote:
> Why need an additional check for scope and not "default" id? I don't see this additional requirement in the standard. 
It's because every variable in map clauses will check this, including those are not struct, class, or union.

Using this, e.g., mapping an integer won't report error that it doesn't have a mapper.


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

https://reviews.llvm.org/D67978





More information about the cfe-commits mailing list