summaryrefslogtreecommitdiffstats
path: root/clang/test/OpenMP/atomic_messages.cpp
diff options
context:
space:
mode:
authorAlexey Bataev <a.bataev@hotmail.com>2015-09-04 12:55:50 +0000
committerAlexey Bataev <a.bataev@hotmail.com>2015-09-04 12:55:50 +0000
commit5a1954780f27686c5a4ff602fb62599d9b57282d (patch)
treec4d132ccfb6d7df1647aef4dab52f8548c05356f /clang/test/OpenMP/atomic_messages.cpp
parent980662ee9db3bbbe851e4e458e2ce71f9be649f6 (diff)
downloadbcm5719-llvm-5a1954780f27686c5a4ff602fb62599d9b57282d.tar.gz
bcm5719-llvm-5a1954780f27686c5a4ff602fb62599d9b57282d.zip
[OPENMP] Fix false diagnostic on instantiation-dependent exprs for atomic constructs.
Some of instantiation-dependent expressions could cause false diagnostic to be emitted about unsupported atomic constructs. Relaxed rules for detection of incorrect expressions. llvm-svn: 246853
Diffstat (limited to 'clang/test/OpenMP/atomic_messages.cpp')
-rw-r--r--clang/test/OpenMP/atomic_messages.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/clang/test/OpenMP/atomic_messages.cpp b/clang/test/OpenMP/atomic_messages.cpp
index c3e02bc96e8..7f78ad443da 100644
--- a/clang/test/OpenMP/atomic_messages.cpp
+++ b/clang/test/OpenMP/atomic_messages.cpp
@@ -48,8 +48,8 @@ T read() {
// expected-note@+1 {{expected built-in assignment operator}}
foo();
#pragma omp atomic read
- // expected-error@+2 {{the statement for 'atomic read' must be an expression statement of form 'v = x;', where v and x are both lvalue expressions with scalar type}}
- // expected-note@+1 {{expected built-in assignment operator}}
+ // expected-error@+2 2 {{the statement for 'atomic read' must be an expression statement of form 'v = x;', where v and x are both lvalue expressions with scalar type}}
+ // expected-note@+1 2 {{expected built-in assignment operator}}
a += b;
#pragma omp atomic read
// expected-error@+2 {{the statement for 'atomic read' must be an expression statement of form 'v = x;', where v and x are both lvalue expressions with scalar type}}
@@ -93,7 +93,8 @@ int read() {
#pragma omp atomic read read
a = b;
- // expected-note@+1 {{in instantiation of function template specialization 'read<S>' requested here}}
+ // expected-note@+2 {{in instantiation of function template specialization 'read<S>' requested here}}
+ // expected-note@+1 {{in instantiation of function template specialization 'read<int>' requested here}}
return read<int>() + read<S>().a;
}
@@ -147,6 +148,7 @@ int write() {
#pragma omp atomic write
a = foo();
+ // expected-note@+1 {{in instantiation of function template specialization 'write<int>' requested here}}
return write<int>();
}
@@ -672,6 +674,7 @@ int capture() {
#pragma omp atomic capture capture
b = a /= b;
+ // expected-note@+1 {{in instantiation of function template specialization 'capture<int>' requested here}}
return capture<int>();
}
OpenPOWER on IntegriCloud