summaryrefslogtreecommitdiff
path: root/test/OpenMP/task_messages.cpp
diff options
context:
space:
mode:
authorAlexey Bataev <a.bataev@hotmail.com>2014-10-08 12:00:22 +0000
committerAlexey Bataev <a.bataev@hotmail.com>2014-10-08 12:00:22 +0000
commit5ab907d08be8e66aac9dd192d6be9701e4757dd8 (patch)
treef4c58e95ea0e1fa18167f4eecacfa581b4301891 /test/OpenMP/task_messages.cpp
parent91cc6cf853648f7999d10e6336bd750b732b2d88 (diff)
downloadclang-5ab907d08be8e66aac9dd192d6be9701e4757dd8.tar.gz
Revert commit r219297.
Still troubles with OpenMP/parallel_firstprivate_codegen.cpp (now in ARM buildbots). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@219298 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/OpenMP/task_messages.cpp')
-rw-r--r--test/OpenMP/task_messages.cpp48
1 files changed, 19 insertions, 29 deletions
diff --git a/test/OpenMP/task_messages.cpp b/test/OpenMP/task_messages.cpp
index b02b43c2b3..88c339afc1 100644
--- a/test/OpenMP/task_messages.cpp
+++ b/test/OpenMP/task_messages.cpp
@@ -5,8 +5,8 @@ void foo() {
#pragma omp task // expected-error {{unexpected OpenMP directive '#pragma omp task'}}
-class S {
- S(const S &s) { a = s.a + 12; } // expected-note 6 {{implicitly declared private here}}
+class S { // expected-note 6 {{'S' declared here}}
+ S(const S &s) { a = s.a + 12; }
int a;
public:
@@ -17,35 +17,23 @@ public:
S operator+(const S &) { return *this; }
};
-class S1 {
- int a;
-
-public:
- S1() : a(0) {}
- S1 &operator++() { return *this; }
- S1(const S1 &) = delete; // expected-note 2 {{'S1' has been explicitly marked deleted here}}
-};
-
template <class T>
int foo() {
- T a;
+ T a; // expected-note 3 {{'a' defined here}}
T &b = a; // expected-note 4 {{'b' defined here}}
int r;
- S1 s1;
-// expected-error@+1 2 {{call to deleted constructor of 'S1'}}
-#pragma omp task
-// expected-note@+1 2 {{predetermined as a firstprivate in a task construct here}}
- ++s1;
#pragma omp task default(none)
#pragma omp task default(shared)
++a;
+// expected-error@+2 {{predetermined as a firstprivate in a task construct variable must have an accessible, unambiguous copy constructor}}
#pragma omp task default(none)
#pragma omp task
- // expected-error@+1 {{calling a private constructor of class 'S'}}
+// expected-note@+1 {{used here}}
++a;
#pragma omp task
+// expected-error@+1 {{predetermined as a firstprivate in a task construct variable must have an accessible, unambiguous copy constructor}}
#pragma omp task
- // expected-error@+1 {{calling a private constructor of class 'S'}}
+ // expected-note@+1 {{used here}}
++a;
#pragma omp task default(shared)
#pragma omp task
@@ -58,11 +46,11 @@ int foo() {
#pragma omp task
// expected-note@+1 2 {{used here}}
++b;
-// expected-error@+2 {{predetermined as a firstprivate in a task construct variable cannot be of reference type 'int &'}}
-// expected-error@+1 {{predetermined as a firstprivate in a task construct variable cannot be of reference type 'S &'}}
+// expected-error@+3 {{predetermined as a firstprivate in a task construct variable cannot be of reference type 'int &'}}
+// expected-error@+2 {{predetermined as a firstprivate in a task construct variable cannot be of reference type 'S &'}}
+// expected-error@+1 {{predetermined as a firstprivate in a task construct variable must have an accessible, unambiguous copy constructor}}
#pragma omp task
-// expected-error@+2 {{calling a private constructor of class 'S'}}
-// expected-note@+1 2 {{used here}}
+// expected-note@+1 3 {{used here}}
#pragma omp parallel shared(a, b)
++a, ++b;
// expected-note@+1 3 {{defined as reduction}}
@@ -121,7 +109,7 @@ int foo() {
int main(int argc, char **argv) {
int a;
int &b = a; // expected-note 2 {{'b' defined here}}
- S sa;
+ S sa; // expected-note 3 {{'sa' defined here}}
S &sb = sa; // expected-note 2 {{'sb' defined here}}
int r;
#pragma omp task { // expected-warning {{extra tokens at the end of '#pragma omp task' are ignored}}
@@ -205,12 +193,14 @@ L2:
#pragma omp task default(shared)
++sa;
#pragma omp task default(none)
+// expected-error@+1 {{predetermined as a firstprivate in a task construct variable must have an accessible, unambiguous copy constructor}}
#pragma omp task
- // expected-error@+1 {{calling a private constructor of class 'S'}}
+// expected-note@+1 {{used here}}
++sa;
#pragma omp task
+// expected-error@+1 {{predetermined as a firstprivate in a task construct variable must have an accessible, unambiguous copy constructor}}
#pragma omp task
- // expected-error@+1 {{calling a private constructor of class 'S'}}
+// expected-note@+1 {{used here}}
++sa;
#pragma omp task default(shared)
#pragma omp task
@@ -222,10 +212,10 @@ L2:
#pragma omp task
// expected-note@+1 {{used here}}
++sb;
-// expected-error@+1 {{predetermined as a firstprivate in a task construct variable cannot be of reference type 'S &'}}
+// expected-error@+2 {{predetermined as a firstprivate in a task construct variable cannot be of reference type 'S &'}}
+// expected-error@+1 {{predetermined as a firstprivate in a task construct variable must have an accessible, unambiguous copy constructor}}
#pragma omp task
-// expected-error@+2 {{calling a private constructor of class 'S'}}
-// expected-note@+1 {{used here}}
+// expected-note@+1 2 {{used here}}
#pragma omp parallel shared(sa, sb)
++sa, ++sb;
// expected-note@+1 2 {{defined as reduction}}