summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaOverload.cpp
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2011-03-29 18:38:10 +0000
committerChandler Carruth <chandlerc@gmail.com>2011-03-29 18:38:10 +0000
commit7750f7694c26a6f0002a4efab8490bf1ac61873e (patch)
treec6652841974a7b257ac4f23d621f0e39682dc7c1 /clang/lib/Sema/SemaOverload.cpp
parent6f2e41e0d4421ab376801bfb88d3f197a8e96994 (diff)
downloadbcm5719-llvm-7750f7694c26a6f0002a4efab8490bf1ac61873e.tar.gz
bcm5719-llvm-7750f7694c26a6f0002a4efab8490bf1ac61873e.zip
Fix an unused variable warning in release builds and make the
assert-less codepath marginally more efficient. llvm-svn: 128472
Diffstat (limited to 'clang/lib/Sema/SemaOverload.cpp')
-rw-r--r--clang/lib/Sema/SemaOverload.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/clang/lib/Sema/SemaOverload.cpp b/clang/lib/Sema/SemaOverload.cpp
index 8125ce10862..c023cd3b2a4 100644
--- a/clang/lib/Sema/SemaOverload.cpp
+++ b/clang/lib/Sema/SemaOverload.cpp
@@ -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);
}
OpenPOWER on IntegriCloud