[OPENMP] Improve error message for mapping union members.

llvm-svn: 319897
This commit is contained in:
Alexey Bataev 2017-12-06 15:04:36 +00:00
parent 999277ad22
commit b7304a15cd
3 changed files with 3 additions and 3 deletions

View File

@ -8617,7 +8617,7 @@ def err_omp_bit_fields_forbidden_in_clause : Error<
def err_array_section_does_not_specify_contiguous_storage : Error<
"array section does not specify contiguous storage">;
def err_omp_union_type_not_allowed : Error<
"mapped storage cannot be derived from a union">;
"mapping of union members is not allowed">;
def err_omp_expected_access_to_data_field : Error<
"expected access to data field">;
def err_omp_multiple_array_items_in_map_clause : Error<

View File

@ -274,7 +274,7 @@ void SAclient(int arg) {
{}
#pragma omp target map((p+1)->A) // expected-error {{expected expression containing only member accesses and/or array sections based on named variables}}
{}
#pragma omp target map(u.B) // expected-error {{mapped storage cannot be derived from a union}}
#pragma omp target map(u.B) // expected-error {{mapping of union members is not allowed}}
{}
#pragma omp target
{

View File

@ -265,7 +265,7 @@ void SAclient(int arg) {
{}
#pragma omp target teams map((p+1)->A) // expected-error {{expected expression containing only member accesses and/or array sections based on named variables}}
{}
#pragma omp target teams map(u.B) // expected-error {{mapped storage cannot be derived from a union}}
#pragma omp target teams map(u.B) // expected-error {{mapping of union members is not allowed}}
{}
#pragma omp target data map(to: r.C) //expected-note {{used here}}