From: NAKAMURA Takumi Date: Wed, 19 Jun 2013 06:58:20 +0000 (+0000) Subject: Fix a warning. [-Wunused-variable] X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1fea06d6116249aadcd8d02127e506dd85d4e659;p=clang Fix a warning. [-Wunused-variable] git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184284 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/CodeGenModule.cpp b/lib/CodeGen/CodeGenModule.cpp index 18c56b0dae..3298d5a089 100644 --- a/lib/CodeGen/CodeGenModule.cpp +++ b/lib/CodeGen/CodeGenModule.cpp @@ -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); }