dependent ->, where the member being referred to is an anonymous struct or
union. This path was missed by the fix in r142890.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142910
91177308-0d34-0410-b5e6-
96231b3b80d8
FoundDecl, Member);
if (BaseResult.isInvalid())
return ExprError();
+ if (isArrow) {
+ BaseResult = getSema().DefaultLvalueConversion(BaseResult.take());
+ if (BaseResult.isInvalid())
+ return ExprError();
+ }
Base = BaseResult.take();
ExprValueKind VK = isArrow ? VK_LValue : Base->getValueKind();
MemberExpr *ME =
Mutex m;
S *s GUARDED_BY(this->m);
};
+ Mutex m;
+ struct U {
+ union {
+ int n;
+ };
+ } *u GUARDED_BY(m);
template<typename U>
struct IndirectLock {
int DoNaughtyThings(T *t) {
+ u->n = 0; // expected-warning {{reading variable 'u' requires locking 'm'}}
return t->s->n; // expected-warning {{reading variable 's' requires locking 'm'}}
}
};