summaryrefslogtreecommitdiffstats
path: root/test/OpenMP/parallel_messages.cpp
diff options
context:
space:
mode:
authorJordan Rupprecht <[email protected]>2019-05-14 21:58:59 +0000
committerJordan Rupprecht <[email protected]>2019-05-14 21:58:59 +0000
commitb35a2aa71f76a334a9c98c0a3c3995b5d902d2b9 (patch)
treecdff4a5d1a715d4ad622fd8f190128b54bebe440 /test/OpenMP/parallel_messages.cpp
parent3748d41833787fcbf59cc5624e8d2b042a8991bc (diff)
parent741e05796da92b46d4f7bcbee00702ff37df6489 (diff)
Creating branches/google/stable and tags/google/stable/2019-05-14 from r360103upstream/google/stable
git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/google/stable@360714 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/OpenMP/parallel_messages.cpp')
-rw-r--r--test/OpenMP/parallel_messages.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/test/OpenMP/parallel_messages.cpp b/test/OpenMP/parallel_messages.cpp
index 8b0c0353c2..49fc2305ff 100644
--- a/test/OpenMP/parallel_messages.cpp
+++ b/test/OpenMP/parallel_messages.cpp
@@ -7,6 +7,7 @@ void foo() {
#pragma omp parallel // expected-error {{unexpected OpenMP directive '#pragma omp parallel'}}
+int a;
struct S;
S& bar();
int main(int argc, char **argv) {
@@ -54,8 +55,11 @@ int main(int argc, char **argv) {
break;
}
}
- #pragma omp parallel default(none)
- ++argc; // expected-error {{variable 'argc' must have explicitly specified data sharing attributes}}
+#pragma omp parallel default(none) // expected-note 2 {{explicit data sharing attribute requested here}}
+ {
+ ++argc; // expected-error {{variable 'argc' must have explicitly specified data sharing attributes}}
+ ++a; // expected-error {{variable 'a' must have explicitly specified data sharing attributes}}
+ }
goto L2; // expected-error {{use of undeclared label 'L2'}}
#pragma omp parallel