Fix warning about unused variable 'Fn' in no-asserts builds. Also reflow this

block so that it looks more like the rest of the file. No functional change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118459 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Nick Lewycky 2010-11-09 00:19:31 +00:00
Родитель 37574f55cd
Коммит 43328e9162
1 изменённых файлов: 5 добавлений и 8 удалений

Просмотреть файл

@ -1389,19 +1389,16 @@ Sema::CXXCheckCStyleCast(SourceRange R, QualType CastTy, Expr *&CastExpr,
}
}
if (tcr != TC_Success && msg != 0)
{
if (CastExpr->getType() == Context.OverloadTy)
{
if (tcr != TC_Success && msg != 0) {
if (CastExpr->getType() == Context.OverloadTy) {
DeclAccessPair Found;
FunctionDecl* Fn = ResolveAddressOfOverloadedFunction(CastExpr,
FunctionDecl *Fn = ResolveAddressOfOverloadedFunction(CastExpr,
CastTy,
/* Complain */ true,
Found);
assert(!Fn && "cast failed but able to resolve overload expression!!");
}
else
{
(void)Fn;
} else {
Diag(R.getBegin(), msg) << (FunctionalStyle ? CT_Functional : CT_CStyle)
<< CastExpr->getType() << CastTy << R;
}