[OPENMP] Fixed data-sharing attributes processing for variables with global
storage.
This fix allows to use non-constant global variables, static local variables and static data
members in data-sharing attribute clauses in parallel and task regions.
llvm-svn: 226250
diff --git a/clang/test/OpenMP/teams_private_messages.cpp b/clang/test/OpenMP/teams_private_messages.cpp
index 16ecb74..65caaed 100644
--- a/clang/test/OpenMP/teams_private_messages.cpp
+++ b/clang/test/OpenMP/teams_private_messages.cpp
@@ -13,7 +13,7 @@
mutable int a;
public:
S2():a(0) { }
- static float S2s; // expected-note {{static data member is predetermined as shared}}
+ static float S2s;
};
const S2 b;
const S2 ba[5];
@@ -88,7 +88,7 @@
#pragma omp teams private(da) // expected-error {{shared variable cannot be private}}
foo();
#pragma omp target
- #pragma omp teams private(S2::S2s) // expected-error {{shared variable cannot be private}}
+ #pragma omp teams private(S2::S2s)
foo();
#pragma omp target
#pragma omp teams private(e, g) // expected-error {{calling a private constructor of class 'S4'}} expected-error {{calling a private constructor of class 'S5'}}