From: Chandler Carruth Date: Mon, 15 Nov 2010 13:54:43 +0000 (+0000) Subject: Silence an unused variable warning during release builds by folding the X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=858a546d8fe73b07f2296313bef2e30445ea164b;p=clang Silence an unused variable warning during release builds by folding the expression into the assert. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119143 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/CGExprCXX.cpp b/lib/CodeGen/CGExprCXX.cpp index 137c54ab1e..66a07454ae 100644 --- a/lib/CodeGen/CGExprCXX.cpp +++ b/lib/CodeGen/CGExprCXX.cpp @@ -361,9 +361,8 @@ CodeGenFunction::EmitSynthesizedCXXCopyCtor(llvm::Value *Dest, if (E->requiresZeroInitialization()) EmitNullInitialization(Dest, E->getType()); - const ConstantArrayType *Array - = getContext().getAsConstantArrayType(E->getType()); - assert (!Array && "EmitSynthesizedCXXCopyCtor - Copied-in Array"); + assert(!getContext().getAsConstantArrayType(E->getType()) + && "EmitSynthesizedCXXCopyCtor - Copied-in Array"); EmitSynthesizedCXXCopyCtorCall(CD, Dest, Src, E->arg_begin(), E->arg_end()); }