summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaCXXCast.cpp
diff options
context:
space:
mode:
authorNick Lewycky <nicholas@mxc.ca>2010-11-09 00:19:31 +0000
committerNick Lewycky <nicholas@mxc.ca>2010-11-09 00:19:31 +0000
commit14d88eb41f7620779c6a832955add6d85ae11f4e (patch)
tree8d6ad43d3b34536f86369c8facfdfbba3d8777c9 /clang/lib/Sema/SemaCXXCast.cpp
parent31b850be156071b4dc80fb1297574915de63f1ee (diff)
downloadbcm5719-llvm-14d88eb41f7620779c6a832955add6d85ae11f4e.tar.gz
bcm5719-llvm-14d88eb41f7620779c6a832955add6d85ae11f4e.zip
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. llvm-svn: 118459
Diffstat (limited to 'clang/lib/Sema/SemaCXXCast.cpp')
-rw-r--r--clang/lib/Sema/SemaCXXCast.cpp13
1 files changed, 5 insertions, 8 deletions
diff --git a/clang/lib/Sema/SemaCXXCast.cpp b/clang/lib/Sema/SemaCXXCast.cpp
index ef71599ead2..25ad7b6a87c 100644
--- a/clang/lib/Sema/SemaCXXCast.cpp
+++ b/clang/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;
}
OpenPOWER on IntegriCloud