[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_reduction_messages.cpp b/clang/test/OpenMP/teams_reduction_messages.cpp
index afedfc3..18b7cd4 100644
--- a/clang/test/OpenMP/teams_reduction_messages.cpp
+++ b/clang/test/OpenMP/teams_reduction_messages.cpp
@@ -16,7 +16,7 @@
 public:
   S2() : a(0) {}
   S2(S2 &s2) : a(s2.a) {}
-  static float S2s; // expected-note 2 {{static data member is predetermined as shared}}
+  static float S2s;
   static const float S2sc;
 };
 const float S2::S2sc = 0; // expected-note 2 {{'S2sc' defined here}}
@@ -136,7 +136,7 @@
 #pragma omp teams reduction(^ : fl) // expected-error {{variable of type 'float' is not valid for specified reduction operation}}
   foo();
 #pragma omp target
-#pragma omp teams reduction(&& : S2::S2s) // expected-error {{shared variable cannot be reduction}}
+#pragma omp teams reduction(&& : S2::S2s)
   foo();
 #pragma omp target
 #pragma omp teams reduction(&& : S2::S2sc) // expected-error {{const-qualified variable cannot be reduction}}
@@ -256,7 +256,7 @@
 #pragma omp teams reduction(^ : fl) // expected-error {{variable of type 'float' is not valid for specified reduction operation}}
   foo();
 #pragma omp target
-#pragma omp teams reduction(&& : S2::S2s) // expected-error {{shared variable cannot be reduction}}
+#pragma omp teams reduction(&& : S2::S2s)
   foo();
 #pragma omp target
 #pragma omp teams reduction(&& : S2::S2sc) // expected-error {{const-qualified variable cannot be reduction}}