[OPENMP 4.1] Allow variables with reference types in private clauses.
OpenMP 4.1 allows to use variables with reference types in all private clauses (private, firstprivate, lastprivate, linear etc.). Patch allows to use such variables and fixes codegen for linear variables with reference types.
llvm-svn: 245268
diff --git a/clang/test/OpenMP/parallel_sections_firstprivate_messages.cpp b/clang/test/OpenMP/parallel_sections_firstprivate_messages.cpp
index 84d1859..3982d73 100644
--- a/clang/test/OpenMP/parallel_sections_firstprivate_messages.cpp
+++ b/clang/test/OpenMP/parallel_sections_firstprivate_messages.cpp
@@ -65,7 +65,7 @@
I e(4);
C g(5);
int i;
- int &j = i; // expected-note {{'j' defined here}}
+ int &j = i;
#pragma omp parallel sections firstprivate // expected-error {{expected '(' after 'firstprivate'}}
{
foo();
@@ -130,7 +130,7 @@
}
#pragma omp parallel shared(i)
#pragma omp parallel private(i)
-#pragma omp parallel sections firstprivate(j) // expected-error {{arguments of OpenMP clause 'firstprivate' cannot be of reference type}}
+#pragma omp parallel sections firstprivate(j)
{
foo();
}
@@ -171,7 +171,7 @@
S3 m;
S6 n(2);
int i;
- int &j = i; // expected-note {{'j' defined here}}
+ int &j = i;
#pragma omp parallel sections firstprivate // expected-error {{expected '(' after 'firstprivate'}}
{
foo();
@@ -266,7 +266,7 @@
{
foo();
}
-#pragma omp parallel sections firstprivate(j) // expected-error {{arguments of OpenMP clause 'firstprivate' cannot be of reference type}}
+#pragma omp parallel sections firstprivate(j)
{
foo();
}