]> granicus.if.org Git - clang/commitdiff
Fix a warning. [-Wunused-variable]
authorNAKAMURA Takumi <geek4civic@gmail.com>
Wed, 19 Jun 2013 06:58:20 +0000 (06:58 +0000)
committerNAKAMURA Takumi <geek4civic@gmail.com>
Wed, 19 Jun 2013 06:58:20 +0000 (06:58 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184284 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/CodeGenModule.cpp

index 18c56b0dae29a25a6e7855786df9552535872f3c..3298d5a0899da5fb7ca1d016a204b8e5c64a530f 100644 (file)
@@ -723,9 +723,9 @@ void CodeGenModule::SetFunctionAttributes(GlobalDecl GD,
     SetLLVMFunctionAttributes(FD, getTypes().arrangeGlobalDeclaration(GD), F);
 
   if (getCXXABI().HasThisReturn(GD)) {
-    llvm::Type *RetTy = F->getReturnType();
     assert(!F->arg_empty() &&
-           F->arg_begin()->getType()->canLosslesslyBitCastTo(RetTy) &&
+           F->arg_begin()->getType()
+             ->canLosslesslyBitCastTo(F->getReturnType()) &&
            "unexpected this return");
     F->addAttribute(1, llvm::Attribute::Returned);
   }