]> granicus.if.org Git - clang/commitdiff
Fix warning about unused variable 'Fn' in no-asserts builds. Also reflow this
authorNick Lewycky <nicholas@mxc.ca>
Tue, 9 Nov 2010 00:19:31 +0000 (00:19 +0000)
committerNick Lewycky <nicholas@mxc.ca>
Tue, 9 Nov 2010 00:19:31 +0000 (00:19 +0000)
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

lib/Sema/SemaCXXCast.cpp

index ef71599ead23d3ff5bb782dce0036cbf67f4a007..25ad7b6a87c04c78659afe9b97b26662d1ff67e5 100644 (file)
@@ -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;
-      FunctionDeclFn = 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;
     }