summaryrefslogtreecommitdiffstats
path: root/clang/test
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2011-10-26 06:15:36 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2011-10-26 06:15:36 +0000
commit3d5c1fa93facbd101c7571036c7efc3a6d5e409b (patch)
treec72e14844c55f8e69f8e94c557e40ebf4ffab0ae /clang/test
parent82f4cf46aa52e927e734f05d46b3c4696dca9b47 (diff)
downloadbcm5719-llvm-3d5c1fa93facbd101c7571036c7efc3a6d5e409b.tar.gz
bcm5719-llvm-3d5c1fa93facbd101c7571036c7efc3a6d5e409b.zip
UnresolvedMemberExprs need lvalue-to-rvalue conversions during template
instantiations too. llvm-svn: 143016
Diffstat (limited to 'clang/test')
-rw-r--r--clang/test/SemaCXX/warn-thread-safety-analysis.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/clang/test/SemaCXX/warn-thread-safety-analysis.cpp b/clang/test/SemaCXX/warn-thread-safety-analysis.cpp
index b4d44170fec..ff290198c01 100644
--- a/clang/test/SemaCXX/warn-thread-safety-analysis.cpp
+++ b/clang/test/SemaCXX/warn-thread-safety-analysis.cpp
@@ -1533,4 +1533,19 @@ namespace template_member_test {
template struct IndirectLock<int>; // expected-note {{here}}
+ struct V {
+ void f(int);
+ void f(double);
+
+ Mutex m;
+ V *p GUARDED_BY(this->m);
+ };
+ template<typename U> struct W {
+ V v;
+ void f(U u) {
+ v.p->f(u); // expected-warning {{reading variable 'p' requires locking 'm'}}
+ }
+ };
+ template struct W<int>; // expected-note {{here}}
+
}
OpenPOWER on IntegriCloud