зеркало из https://github.com/microsoft/clang-1.git
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:
Родитель
37574f55cd
Коммит
43328e9162
|
@ -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,
|
||||
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;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче