forked from OSchip/llvm-project
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
This commit is contained in:
parent
63871d255f
commit
1d8362cd19
|
@ -19,7 +19,8 @@ int main(int argc, char **argv) {
|
|||
#pragma omp parallel } // expected-warning {{extra tokens at the end of '#pragma omp parallel' are ignored}}
|
||||
foo();
|
||||
#pragma omp parallel
|
||||
#pragma omp parallel unknown() // expected-warning {{extra tokens at the end of '#pragma omp parallel' are ignored}}
|
||||
// expected-warning@+1 {{extra tokens at the end of '#pragma omp parallel' are ignored}}
|
||||
#pragma omp parallel unknown()
|
||||
foo();
|
||||
L1:
|
||||
foo();
|
||||
|
|
|
@ -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}}
|
||||
|
|
Loading…
Reference in New Issue