diff options
author | Chandler Carruth <chandlerc@gmail.com> | 2011-03-29 18:38:10 +0000 |
---|---|---|
committer | Chandler Carruth <chandlerc@gmail.com> | 2011-03-29 18:38:10 +0000 |
commit | fc5c8fc5ff02fb4ae2d4cf693d2ceabd1d8a1845 (patch) | |
tree | b8175e95bc485a8460e42b257cf0d32681312fc7 /lib/Sema/SemaOverload.cpp | |
parent | b603c90b75df2141c5722816a13920221eb4faee (diff) |
Fix an unused variable warning in release builds and make the
assert-less codepath marginally more efficient.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128472 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaOverload.cpp')
-rw-r--r-- | lib/Sema/SemaOverload.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Sema/SemaOverload.cpp b/lib/Sema/SemaOverload.cpp index 8125ce1086..c023cd3b2a 100644 --- a/lib/Sema/SemaOverload.cpp +++ b/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); } |