From 3d5c1fa93facbd101c7571036c7efc3a6d5e409b Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Wed, 26 Oct 2011 06:15:36 +0000 Subject: UnresolvedMemberExprs need lvalue-to-rvalue conversions during template instantiations too. llvm-svn: 143016 --- clang/test/SemaCXX/warn-thread-safety-analysis.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'clang/test') 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; // expected-note {{here}} + struct V { + void f(int); + void f(double); + + Mutex m; + V *p GUARDED_BY(this->m); + }; + template struct W { + V v; + void f(U u) { + v.p->f(u); // expected-warning {{reading variable 'p' requires locking 'm'}} + } + }; + template struct W; // expected-note {{here}} + } -- cgit v1.2.3