[cfe-commits] r128472 - /cfe/trunk/lib/Sema/SemaOverload.cpp
Chandler Carruth
chandlerc at gmail.com
Tue Mar 29 11:38:10 PDT 2011
Author: chandlerc
Date: Tue Mar 29 13:38:10 2011
New Revision: 128472
URL: http://llvm.org/viewvc/llvm-project?rev=128472&view=rev
Log:
Fix an unused variable warning in release builds and make the
assert-less codepath marginally more efficient.
Modified:
cfe/trunk/lib/Sema/SemaOverload.cpp
Modified: cfe/trunk/lib/Sema/SemaOverload.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaOverload.cpp?rev=128472&r1=128471&r2=128472&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaOverload.cpp (original)
+++ cfe/trunk/lib/Sema/SemaOverload.cpp Tue Mar 29 13:38:10 2011
@@ -1074,9 +1074,9 @@
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);
}
More information about the cfe-commits
mailing list