diff options
author | Alexey Bataev <a.bataev@hotmail.com> | 2014-10-08 11:12:35 +0000 |
---|---|---|
committer | Alexey Bataev <a.bataev@hotmail.com> | 2014-10-08 11:12:35 +0000 |
commit | bdef50e1adc316742bc1fd6d931c4841e9838b5c (patch) | |
tree | b5d2584c32f9b90dff7c55af25732e86af551de4 /clang/test/OpenMP/task_messages.cpp | |
parent | e7a5517a583529d2288c74b685323c05edb4947e (diff) | |
download | bcm5719-llvm-bdef50e1adc316742bc1fd6d931c4841e9838b5c.tar.gz bcm5719-llvm-bdef50e1adc316742bc1fd6d931c4841e9838b5c.zip |
Revert back r219295.
To fix issues with test OpenMP/parallel_firstprivate_codegen.cpp
llvm-svn: 219296
Diffstat (limited to 'clang/test/OpenMP/task_messages.cpp')
-rw-r--r-- | clang/test/OpenMP/task_messages.cpp | 48 |
1 files changed, 19 insertions, 29 deletions
diff --git a/clang/test/OpenMP/task_messages.cpp b/clang/test/OpenMP/task_messages.cpp index b02b43c2b39..88c339afc11 100644 --- a/clang/test/OpenMP/task_messages.cpp +++ b/clang/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}} |