summaryrefslogtreecommitdiffstats
path: root/test/OpenMP/threadprivate_ast_print.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/OpenMP/threadprivate_ast_print.cpp')
-rw-r--r--test/OpenMP/threadprivate_ast_print.cpp20
1 files changed, 19 insertions, 1 deletions
diff --git a/test/OpenMP/threadprivate_ast_print.cpp b/test/OpenMP/threadprivate_ast_print.cpp
index deb829e..72bf6f4 100644
--- a/test/OpenMP/threadprivate_ast_print.cpp
+++ b/test/OpenMP/threadprivate_ast_print.cpp
@@ -1,5 +1,12 @@
// RUN: %clang_cc1 -verify -fopenmp -ast-print %s | FileCheck %s
+// RUN: %clang_cc1 -fopenmp -x c++ -std=c++11 -emit-pch -o %t %s
+// RUN: %clang_cc1 -fopenmp -std=c++11 -include-pch %t -fsyntax-only -verify %s -ast-print
// expected-no-diagnostics
+// FIXME: This test has been crashing since r186647.
+// REQUIRES: disabled
+
+#ifndef HEADER
+#define HEADER
struct St{
int a;
@@ -10,7 +17,7 @@ struct St1{
static int b;
// CHECK: static int b;
#pragma omp threadprivate(b)
-// CHECK-NEXT: #pragma omp threadprivate(b)
+// CHECK-NEXT: #pragma omp threadprivate(St1::b)
} d;
int a, b;
@@ -33,6 +40,15 @@ template <class T> T foo() {
//CHECK-NEXT: static T v;
//CHECK-NEXT: #pragma omp threadprivate(v)
+namespace ns{
+ int a;
+}
+// CHECK: namespace ns {
+// CHECK-NEXT: int a;
+// CHECK-NEXT: }
+#pragma omp threadprivate(ns::a)
+// CHECK-NEXT: #pragma omp threadprivate(ns::a)
+
int main () {
static int a;
// CHECK: static int a;
@@ -41,3 +57,5 @@ int main () {
a=2;
return (foo<int>());
}
+
+#endif
OpenPOWER on IntegriCloud