]> granicus.if.org Git - clang/commitdiff
Remove redundant check.
authorChad Rosier <mcrosier@apple.com>
Sat, 18 Feb 2012 00:37:07 +0000 (00:37 +0000)
committerChad Rosier <mcrosier@apple.com>
Sat, 18 Feb 2012 00:37:07 +0000 (00:37 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150855 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/CodeGenFunction.cpp

index 28c5935de0491faecebfc1fbe9bf89290e1328e9..47176bd8ecc39ca916725aa637c4ce3d256b7c9a 100644 (file)
@@ -428,9 +428,8 @@ void CodeGenFunction::GenerateCode(GlobalDecl GD, llvm::Function *Fn,
   if (isa<CXXMethodDecl>(FD) && cast<CXXMethodDecl>(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();