summaryrefslogtreecommitdiffstats
path: root/test/OpenMP/target_exit_data_nowait_messages.cpp
diff options
context:
space:
mode:
authorArpith Chacko Jacob <acjacob@us.ibm.com>2016-01-22 00:22:05 +0000
committerArpith Chacko Jacob <acjacob@us.ibm.com>2016-01-22 00:22:05 +0000
commitf6cb9a6cfef1eaafbc6d80d7c523134326c8346b (patch)
tree0281516bda481b24ef89707277f2432de63e935d /test/OpenMP/target_exit_data_nowait_messages.cpp
parentd9a1c345df81ad4636a3257b8939338586b3f275 (diff)
[OpenMP] Parsing + Sema for nowait clause on target exit data directive.
Summary: Accept nowait clause on target exit data directive in sema and add test cases. Reviewers: ABataev Differential Revision: http://reviews.llvm.org/D16362 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@258459 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/OpenMP/target_exit_data_nowait_messages.cpp')
-rw-r--r--test/OpenMP/target_exit_data_nowait_messages.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/test/OpenMP/target_exit_data_nowait_messages.cpp b/test/OpenMP/target_exit_data_nowait_messages.cpp
new file mode 100644
index 0000000000..cd743d8927
--- /dev/null
+++ b/test/OpenMP/target_exit_data_nowait_messages.cpp
@@ -0,0 +1,17 @@
+// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 -o - %s
+
+int main(int argc, char **argv) {
+ int i;
+
+ #pragma omp nowait target exit data map(from: i) // expected-error {{expected an OpenMP directive}}
+ #pragma omp target nowait exit data map(from: i) // expected-warning {{extra tokens at the end of '#pragma omp target' are ignored}}
+ #pragma omp target exit nowait data map(from: i) // expected-error {{expected an OpenMP directive}}
+ #pragma omp target exit data nowait() map(from: i) // expected-warning {{extra tokens at the end of '#pragma omp target exit data' are ignored}} expected-error {{expected at least one map clause for '#pragma omp target exit data'}}
+ #pragma omp target exit data map(from: i) nowait( // expected-warning {{extra tokens at the end of '#pragma omp target exit data' are ignored}}
+ #pragma omp target exit data map(from: i) nowait (argc)) // expected-warning {{extra tokens at the end of '#pragma omp target exit data' are ignored}}
+ #pragma omp target exit data map(from: i) nowait device (-10u)
+ #pragma omp target exit data map(from: i) nowait (3.14) device (-10u) // expected-warning {{extra tokens at the end of '#pragma omp target exit data' are ignored}}
+ #pragma omp target exit data map(from: i) nowait nowait // expected-error {{directive '#pragma omp target exit data' cannot contain more than one 'nowait' clause}}
+ #pragma omp target exit data nowait map(from: i) nowait // expected-error {{directive '#pragma omp target exit data' cannot contain more than one 'nowait' clause}}
+ return 0;
+}