From: Chad Rosier Date: Sat, 18 Feb 2012 00:37:07 +0000 (+0000) Subject: Remove redundant check. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6e94f6c0f124c9a88b3dae0eea5e6b27957df183;p=clang Remove redundant check. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150855 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/CodeGenFunction.cpp b/lib/CodeGen/CodeGenFunction.cpp index 28c5935de0..47176bd8ec 100644 --- a/lib/CodeGen/CodeGenFunction.cpp +++ b/lib/CodeGen/CodeGenFunction.cpp @@ -428,9 +428,8 @@ void CodeGenFunction::GenerateCode(GlobalDecl GD, llvm::Function *Fn, if (isa(FD) && cast(FD)->isInstance()) CGM.getCXXABI().BuildInstanceFunctionParams(*this, ResTy, Args); - if (FD->getNumParams()) - for (unsigned i = 0, e = FD->getNumParams(); i != e; ++i) - Args.push_back(FD->getParamDecl(i)); + for (unsigned i = 0, e = FD->getNumParams(); i != e; ++i) + Args.push_back(FD->getParamDecl(i)); SourceRange BodyRange; if (Stmt *Body = FD->getBody()) BodyRange = Body->getSourceRange();