assert-less codepath marginally more efficient.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128472
91177308-0d34-0410-b5e6-
96231b3b80d8
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);
}