[cfe-commits] r118459 - /cfe/trunk/lib/Sema/SemaCXXCast.cpp
Nick Lewycky
nicholas at mxc.ca
Mon Nov 8 16:19:31 PST 2010
Author: nicholas
Date: Mon Nov 8 18:19:31 2010
New Revision: 118459
URL: http://llvm.org/viewvc/llvm-project?rev=118459&view=rev
Log:
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.
Modified:
cfe/trunk/lib/Sema/SemaCXXCast.cpp
Modified: cfe/trunk/lib/Sema/SemaCXXCast.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaCXXCast.cpp?rev=118459&r1=118458&r2=118459&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaCXXCast.cpp (original)
+++ cfe/trunk/lib/Sema/SemaCXXCast.cpp Mon Nov 8 18:19:31 2010
@@ -1389,19 +1389,16 @@
}
}
- 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;
}
More information about the cfe-commits
mailing list