aboutsummaryrefslogtreecommitdiff
path: root/test/OpenMP/openmp_check.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/OpenMP/openmp_check.cpp')
-rw-r--r--test/OpenMP/openmp_check.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/test/OpenMP/openmp_check.cpp b/test/OpenMP/openmp_check.cpp
index d46213a90e9f..cd4706b57e44 100644
--- a/test/OpenMP/openmp_check.cpp
+++ b/test/OpenMP/openmp_check.cpp
@@ -2,7 +2,16 @@
// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -std=c++98 %s
// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -std=c++98 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -std=c++11 %s
+// SIMD-ONLY0-NOT: {{__kmpc|__tgt}}
+
+#define p _Pragma("omp parallel")
+
int nested(int a) {
+#pragma omp parallel p // expected-error {{unexpected OpenMP directive}}
+ ++a;
#pragma omp parallel
++a;
@@ -11,8 +20,6 @@ int nested(int a) {
// expected-warning@-2 {{'auto' type specifier is a C++11 extension}}
// expected-error@-3 {{expected expression}}
// expected-error@-4 {{expected ';' at end of declaration}}
-#else
- // expected-no-diagnostics
#endif
#pragma omp parallel