diff options
author | Nick Lewycky <nicholas@mxc.ca> | 2010-11-09 00:19:31 +0000 |
---|---|---|
committer | Nick Lewycky <nicholas@mxc.ca> | 2010-11-09 00:19:31 +0000 |
commit | 43328e91627382870d51b5d84e08873cc0c970eb (patch) | |
tree | e7db1450029c87fb6f0e2ca076314f434a8cd3db /lib/Sema/SemaCXXCast.cpp | |
parent | 37574f55cd637340f651330f5cfda69742880d36 (diff) |
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
Diffstat (limited to 'lib/Sema/SemaCXXCast.cpp')
-rw-r--r-- | lib/Sema/SemaCXXCast.cpp | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/lib/Sema/SemaCXXCast.cpp b/lib/Sema/SemaCXXCast.cpp index ef71599ead..25ad7b6a87 100644 --- a/lib/Sema/SemaCXXCast.cpp +++ b/lib/Sema/SemaCXXCast.cpp @@ -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; } |