summaryrefslogtreecommitdiffstats
path: root/clang/test
diff options
context:
space:
mode:
authorAlexey Bataev <a.bataev@hotmail.com>2013-09-26 03:24:06 +0000
committerAlexey Bataev <a.bataev@hotmail.com>2013-09-26 03:24:06 +0000
commit7d2960bd2a137cbb9ed416e6abcf5acd411562dc (patch)
tree895bf3feb39bb496cfb7129d88ac88d4be0c0539 /clang/test
parent3eb663b03730e5571f8c75fbf20d6a6701114696 (diff)
downloadbcm5719-llvm-7d2960bd2a137cbb9ed416e6abcf5acd411562dc.tar.gz
bcm5719-llvm-7d2960bd2a137cbb9ed416e6abcf5acd411562dc.zip
[OPENMP] Improved variable lookup procedure for threadprivate variables.
llvm-svn: 191416
Diffstat (limited to 'clang/test')
-rw-r--r--clang/test/OpenMP/threadprivate_ast_print.cpp11
-rw-r--r--clang/test/OpenMP/threadprivate_messages.cpp6
2 files changed, 13 insertions, 4 deletions
diff --git a/clang/test/OpenMP/threadprivate_ast_print.cpp b/clang/test/OpenMP/threadprivate_ast_print.cpp
index ddf488250aa..823a4d6d8dd 100644
--- a/clang/test/OpenMP/threadprivate_ast_print.cpp
+++ b/clang/test/OpenMP/threadprivate_ast_print.cpp
@@ -15,7 +15,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;
@@ -38,6 +38,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;
diff --git a/clang/test/OpenMP/threadprivate_messages.cpp b/clang/test/OpenMP/threadprivate_messages.cpp
index a188a0b05d6..4858549a703 100644
--- a/clang/test/OpenMP/threadprivate_messages.cpp
+++ b/clang/test/OpenMP/threadprivate_messages.cpp
@@ -60,12 +60,12 @@ class Class {
#pragma omp threadprivate (g)
namespace ns {
- int m; // expected-note 2 {{'m' defined here}}
+ int m;
#pragma omp threadprivate (m)
}
#pragma omp threadprivate (m) // expected-error {{use of undeclared identifier 'm'}}
-#pragma omp threadprivate (ns::m) // expected-error {{'#pragma omp threadprivate' must appear in the scope of the 'ns::m' variable declaration}}
-#pragma omp threadprivate (ns:m) // expected-error {{unexpected ':' in nested name specifier; did you mean '::'?}} expected-error {{'#pragma omp threadprivate' must appear in the scope of the 'ns::m' variable declaration}}
+#pragma omp threadprivate (ns::m) // expected-error {{'#pragma omp threadprivate' must precede all references to variable 'ns::m'}}
+#pragma omp threadprivate (ns:m) // expected-error {{unexpected ':' in nested name specifier; did you mean '::'?}} expected-error {{'#pragma omp threadprivate' must precede all references to variable 'ns::m'}}
const int h = 12;
const volatile int i = 10;
OpenPOWER on IntegriCloud