summaryrefslogtreecommitdiffstats
path: root/clang/test/OpenMP/parallel_for_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/parallel_for_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/parallel_for_linear_messages.cpp')
-rw-r--r--clang/test/OpenMP/parallel_for_linear_messages.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/test/OpenMP/parallel_for_linear_messages.cpp b/clang/test/OpenMP/parallel_for_linear_messages.cpp
index 080add692ca..6596814de64 100644
--- a/clang/test/OpenMP/parallel_for_linear_messages.cpp
+++ b/clang/test/OpenMP/parallel_for_linear_messages.cpp
@@ -146,7 +146,7 @@ int foomain(I argc, C **argv) {
for (int k = 0; k < argc; ++k)
++k;
// expected-error@+2 {{linear variable with incomplete type 'S1'}}
-// expected-error@+1 {{const-qualified variable cannot be linear}}
+// expected-error@+1 {{argument of a linear clause should be of integral or pointer type, not 'S2'}}
#pragma omp parallel for linear(a, b : B::ib)
for (int k = 0; k < argc; ++k)
++k;
@@ -231,7 +231,7 @@ int main(int argc, char **argv) {
for (int k = 0; k < argc; ++k)
++k;
// expected-error@+2 {{linear variable with incomplete type 'S1'}}
-// expected-error@+1 {{const-qualified variable cannot be linear}}
+// expected-error@+1 {{argument of a linear clause should be of integral or pointer type, not 'S2'}}
#pragma omp parallel for linear(a, b)
for (int k = 0; k < argc; ++k)
++k;
OpenPOWER on IntegriCloud