summaryrefslogtreecommitdiffstats
path: root/clang/test/OpenMP/target_update_if_messages.cpp
diff options
context:
space:
mode:
authorAlexey Bataev <a.bataev@hotmail.com>2016-12-20 12:10:05 +0000
committerAlexey Bataev <a.bataev@hotmail.com>2016-12-20 12:10:05 +0000
commit2a6de8c32117e7d8f16798f62d0339e08d9f7cdb (patch)
tree75907c9b4920e1e069861df6f1cc26e04f9cbfc6 /clang/test/OpenMP/target_update_if_messages.cpp
parentd003c7f39401ba2ca259f2ebee6874a38282616f (diff)
downloadbcm5719-llvm-2a6de8c32117e7d8f16798f62d0339e08d9f7cdb.tar.gz
bcm5719-llvm-2a6de8c32117e7d8f16798f62d0339e08d9f7cdb.zip
[OPENMP] Fix for PR31428: variable named like directive name modifier
Directive name modifiers in 'if' clause are allowed only for OpenMP 4.5 and higher + in OpenMP 4.5 parsing procedure emits error message if ':' is not found after directive name modifier. llvm-svn: 290175
Diffstat (limited to 'clang/test/OpenMP/target_update_if_messages.cpp')
-rw-r--r--clang/test/OpenMP/target_update_if_messages.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/clang/test/OpenMP/target_update_if_messages.cpp b/clang/test/OpenMP/target_update_if_messages.cpp
index 97715e07242..3d076a6389d 100644
--- a/clang/test/OpenMP/target_update_if_messages.cpp
+++ b/clang/test/OpenMP/target_update_if_messages.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s
+// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -ferror-limit 100 %s
void foo() {
}
@@ -23,7 +23,7 @@ int tmain(T argc, S **argv) {
#pragma omp target update to(n) if (argv[1]=2) // expected-error {{expected ')'}} expected-note {{to match this '('}}
#pragma omp target update from(n) if (argc argc) // expected-error {{expected ')'}} expected-note {{to match this '('}}
#pragma omp target update to(n) if(argc)
-#pragma omp target update from(n) if(target update // expected-warning {{missing ':' after directive name modifier - ignoring}} expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
+#pragma omp target update from(n) if(target update // expected-error {{use of undeclared identifier 'target'}} expected-error {{expected ')'}} expected-note {{to match this '('}}
#pragma omp target update to(n) if(target update : // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
#pragma omp target update from(n) if(target update : argc // expected-error {{expected ')'}} expected-note {{to match this '('}}
#pragma omp target update to(n) if(target update : argc)
@@ -47,7 +47,7 @@ int main(int argc, char **argv) {
#pragma omp target update from(m) if (argc argc) // expected-error {{expected ')'}} expected-note {{to match this '('}}
#pragma omp target update to(m) if (1 0) // expected-error {{expected ')'}} expected-note {{to match this '('}}
#pragma omp target update from(m) if(if(tmain(argc, argv) // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
-#pragma omp target update to(m) if(target update // expected-warning {{missing ':' after directive name modifier - ignoring}} expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
+#pragma omp target update to(m) if(target update // expected-error {{use of undeclared identifier 'target'}} expected-error {{expected ')'}} expected-note {{to match this '('}}
#pragma omp target update from(m) if(target update : // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
#pragma omp target update to(m) if(target update : argc // expected-error {{expected ')'}} expected-note {{to match this '('}}
#pragma omp target update from(m) if(target update : argc)
OpenPOWER on IntegriCloud