diff options
author | Alp Toker <alp@nuanti.com> | 2013-12-18 22:34:19 +0000 |
---|---|---|
committer | Alp Toker <alp@nuanti.com> | 2013-12-18 22:34:19 +0000 |
commit | 1d8362cd19e33be2d4051e1c3f3bda9be10d451a (patch) | |
tree | 2e727a2df856e01f28edb97868ac5d7a466a3b0a /clang/test/OpenMP/threadprivate_messages.cpp | |
parent | 63871d255fb4fed0832ab4213cc380ac2446ee64 (diff) | |
download | bcm5719-llvm-1d8362cd19e33be2d4051e1c3f3bda9be10d451a.tar.gz bcm5719-llvm-1d8362cd19e33be2d4051e1c3f3bda9be10d451a.zip |
Enhance OpenMP parser tests from r197553 / r197598
Move some of the verifier directives away from the end of the pragma line.
This ensures that the diagnostics relate to the trailing token being tested and
not the verifier comments which are themselves part of the token stream.
llvm-svn: 197616
Diffstat (limited to 'clang/test/OpenMP/threadprivate_messages.cpp')
-rw-r--r-- | clang/test/OpenMP/threadprivate_messages.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/clang/test/OpenMP/threadprivate_messages.cpp b/clang/test/OpenMP/threadprivate_messages.cpp index 1665c48cafb..943fca51058 100644 --- a/clang/test/OpenMP/threadprivate_messages.cpp +++ b/clang/test/OpenMP/threadprivate_messages.cpp @@ -24,7 +24,8 @@ int foo() { // expected-note {{declared here}} return (a); } -#pragma omp threadprivate (a) ( // expected-error {{'#pragma omp threadprivate' must precede all references to variable 'a'}} expected-warning {{extra tokens at the end of '#pragma omp threadprivate' are ignored}} +#pragma omp threadprivate (a) ( +// expected-error@-1 {{'#pragma omp threadprivate' must precede all references to variable 'a'}} expected-warning@-1 {{extra tokens at the end of '#pragma omp threadprivate' are ignored}} #pragma omp threadprivate (a) [ // expected-error {{'#pragma omp threadprivate' must precede all references to variable 'a'}} expected-warning {{extra tokens at the end of '#pragma omp threadprivate' are ignored}} #pragma omp threadprivate (a) { // expected-error {{'#pragma omp threadprivate' must precede all references to variable 'a'}} expected-warning {{extra tokens at the end of '#pragma omp threadprivate' are ignored}} #pragma omp threadprivate (a) ) // expected-error {{'#pragma omp threadprivate' must precede all references to variable 'a'}} expected-warning {{extra tokens at the end of '#pragma omp threadprivate' are ignored}} @@ -35,8 +36,10 @@ int foo() { // expected-note {{declared here}} #pragma omp threadprivate(d)) // expected-error {{'#pragma omp threadprivate' must precede all references to variable 'd'}} expected-warning {{extra tokens at the end of '#pragma omp threadprivate' are ignored}} int x, y; #pragma omp threadprivate(x)) // expected-warning {{extra tokens at the end of '#pragma omp threadprivate' are ignored}} -#pragma omp threadprivate(y)), // expected-warning {{extra tokens at the end of '#pragma omp threadprivate' are ignored}} -#pragma omp threadprivate(a,d) // expected-error {{'#pragma omp threadprivate' must precede all references to variable 'a'}} expected-error {{'#pragma omp threadprivate' must precede all references to variable 'd'}} +#pragma omp threadprivate(y)), +// expected-warning@-1 {{extra tokens at the end of '#pragma omp threadprivate' are ignored}} +#pragma omp threadprivate(a,d) +// expected-error@-1 {{'#pragma omp threadprivate' must precede all references to variable 'a'}} expected-error@-1 {{'#pragma omp threadprivate' must precede all references to variable 'd'}} #pragma omp threadprivate(d.a) // expected-error {{expected identifier}} #pragma omp threadprivate((float)a) // expected-error {{expected unqualified-id}} int foa; // expected-note {{'foa' declared here}} |