[PATCH] D16280: [OpenMP] Detect implicit map type to report unspecified map type for target enter/exit data directives.

Arpith Jacob via cfe-commits cfe-commits at lists.llvm.org
Sun Jan 17 14:14:22 PST 2016


arpith-jacob created this revision.
arpith-jacob added reviewers: kkwli0, ABataev, sfantao, hfinkel, carlo.bertolli.
arpith-jacob added subscribers: cfe-commits, caomhin, fraggamuffin.

Support for the following OpenMP 4.5 restriction on 'target enter data' and 'target exit data':
- A map-type must be specified in all map clauses.

I have to save 'IsMapTypeImplicit' when parsing a map clause to support this constraint and for more informative error messages. This helps me support the following case:

#pragma omp target enter data map(r) // expected-error {{map type must be specified for '#pragma omp target enter data'}}

and distinguish it from:

#pragma omp target enter data map(tofrom: r) // expected-error {{map type 'tofrom' is not allowed for '#pragma omp target enter data'}}


http://reviews.llvm.org/D16280

Files:
  include/clang/AST/OpenMPClause.h
  include/clang/Sema/Sema.h
  lib/AST/OpenMPClause.cpp
  lib/Parse/ParseOpenMP.cpp
  lib/Sema/SemaOpenMP.cpp
  lib/Sema/TreeTransform.h
  test/OpenMP/target_enter_data_map_messages.c
  test/OpenMP/target_exit_data_map_messages.c

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D16280.45125.patch
Type: text/x-patch
Size: 13813 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160117/22e24881/attachment.bin>


More information about the cfe-commits mailing list