Fix an unused variable warning in release builds and make the

assert-less codepath marginally more efficient.

llvm-svn: 128472
This commit is contained in:
Chandler Carruth 2011-03-29 18:38:10 +00:00
parent 6f2e41e0d4
commit 7750f7694c
1 changed files with 3 additions and 3 deletions

View File

@ -1074,9 +1074,9 @@ static bool IsStandardConversion(Sema &S, Expr* From, QualType ToType,
const Type *ClassType
= S.Context.getTypeDeclType(Method->getParent()).getTypePtr();
FromType = S.Context.getMemberPointerType(FromType, ClassType);
} else if (UnaryOperator *UnOp
= dyn_cast<UnaryOperator>(From->IgnoreParens())) {
assert(UnOp->getOpcode() == UO_AddrOf &&
} else if (isa<UnaryOperator>(From->IgnoreParens())) {
assert(cast<UnaryOperator>(From->IgnoreParens())->getOpcode() ==
UO_AddrOf &&
"Non-address-of operator for overloaded function expression");
FromType = S.Context.getPointerType(FromType);
}