Author: alp
Date: Wed Dec 18 16:34:19 2013
New Revision: 197616

URL: http://llvm.org/viewvc/llvm-project?rev=197616&view=rev
Log:
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.

Modified:
    cfe/trunk/test/OpenMP/parallel_messages.cpp
    cfe/trunk/test/OpenMP/threadprivate_messages.cpp

Modified: cfe/trunk/test/OpenMP/parallel_messages.cpp
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/parallel_messages.cpp?rev=197616&r1=197615&r2=197616&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/parallel_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/parallel_messages.cpp Wed Dec 18 16:34:19 2013
@@ -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();

Modified: cfe/trunk/test/OpenMP/threadprivate_messages.cpp
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/threadprivate_messages.cpp?rev=197616&r1=197615&r2=197616&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/threadprivate_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/threadprivate_messages.cpp Wed Dec 18 16:34:19 2013
@@ -24,7 +24,8 @@ int foo() { // expected-note {{declared
   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
 #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}}


_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to