Fix an incorrect assert, the LHS can be an LValue.

llvm-svn: 167232
This commit is contained in:
Rafael Espindola 2012-11-01 14:32:20 +00:00
parent da2afc9a70
commit 973aa207e8
2 changed files with 13 additions and 1 deletions

View File

@ -81,7 +81,7 @@ Expr::skipRValueSubobjectAdjustments(
}
} else if (const BinaryOperator *BO = dyn_cast<BinaryOperator>(E)) {
if (BO->isPtrMemOp()) {
assert(BO->getLHS()->isRValue());
assert(BO->getRHS()->isRValue());
E = BO->getLHS();
const MemberPointerType *MPT =
BO->getRHS()->getType()->getAs<MemberPointerType>();

View File

@ -159,3 +159,15 @@ namespace test2 {
}
}
}
namespace test3 {
struct nsCSSRect {
};
static int nsCSSRect::* sides;
nsCSSRect dimenX;
void ParseBoxCornerRadii(int y) {
switch (y) {
}
int& x = dimenX.*sides;
}
}