summaryrefslogtreecommitdiffstats
path: root/clang/test/OpenMP/distribute_simd_linear_messages.cpp
diff options
context:
space:
mode:
authorJoel E. Denny <jdenny.ornl@gmail.com>2019-01-04 22:12:13 +0000
committerJoel E. Denny <jdenny.ornl@gmail.com>2019-01-04 22:12:13 +0000
commitbae586fb0a3d78104b589ad8977e6f29295aa930 (patch)
treef0d7f9adc7dcf00e301fb434cb99db21ce401a7c /clang/test/OpenMP/distribute_simd_linear_messages.cpp
parentd2649292ef268cbc4b80854659a716791ad2c0b9 (diff)
downloadbcm5719-llvm-bae586fb0a3d78104b589ad8977e6f29295aa930.tar.gz
bcm5719-llvm-bae586fb0a3d78104b589ad8977e6f29295aa930.zip
[OpenMP] Refactor const restriction for linear
As discussed in D56113, this patch refactors the implementation of the const restriction for linear to reuse a function introduced by D56113. A side effect is that, if a variable has mutable members, this diagnostic is now skipped, and the diagnostic for the variable not being an integer or pointer is reported instead. Reviewed By: ABataev Differential Revision: https://reviews.llvm.org/D56299 llvm-svn: 350441
Diffstat (limited to 'clang/test/OpenMP/distribute_simd_linear_messages.cpp')
-rw-r--r--clang/test/OpenMP/distribute_simd_linear_messages.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/test/OpenMP/distribute_simd_linear_messages.cpp b/clang/test/OpenMP/distribute_simd_linear_messages.cpp
index f9af5dd94fc..631b43a1209 100644
--- a/clang/test/OpenMP/distribute_simd_linear_messages.cpp
+++ b/clang/test/OpenMP/distribute_simd_linear_messages.cpp
@@ -189,7 +189,7 @@ template<class I, class C> int foomain(I argc, C **argv) {
#pragma omp target
#pragma omp teams
-#pragma omp distribute simd linear (a, b:B::ib) // expected-error {{linear variable with incomplete type 'S1'}} expected-error {{const-qualified variable cannot be linear}}
+#pragma omp distribute simd linear (a, b:B::ib) // expected-error {{linear variable with incomplete type 'S1'}} expected-error {{argument of a linear clause should be of integral or pointer type, not 'S2'}}
for (int k = 0; k < argc; ++k) ++k;
#pragma omp target
@@ -283,7 +283,7 @@ int main(int argc, char **argv) {
#pragma omp target
#pragma omp teams
-#pragma omp distribute simd linear (a, b) // expected-error {{linear variable with incomplete type 'S1'}} expected-error {{const-qualified variable cannot be linear}} expected-warning {{Non-trivial type 'const S2' is mapped, only trivial types are guaranteed to be mapped correctly}} expected-error {{incomplete type 'S1' where a complete type is required}}
+#pragma omp distribute simd linear (a, b) // expected-error {{linear variable with incomplete type 'S1'}} expected-error {{argument of a linear clause should be of integral or pointer type, not 'S2'}} expected-warning {{Non-trivial type 'const S2' is mapped, only trivial types are guaranteed to be mapped correctly}} expected-error {{incomplete type 'S1' where a complete type is required}}
for (int k = 0; k < argc; ++k) ++k;
#pragma omp target
OpenPOWER on IntegriCloud