[cfe-commits] r150855 - /cfe/trunk/lib/CodeGen/CodeGenFunction.cpp

Chad Rosier mcrosier at apple.com
Fri Feb 17 16:37:07 PST 2012


Author: mcrosier
Date: Fri Feb 17 18:37:07 2012
New Revision: 150855

URL: http://llvm.org/viewvc/llvm-project?rev=150855&view=rev
Log:
Remove redundant check.

Modified:
    cfe/trunk/lib/CodeGen/CodeGenFunction.cpp

Modified: cfe/trunk/lib/CodeGen/CodeGenFunction.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CodeGenFunction.cpp?rev=150855&r1=150854&r2=150855&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CodeGenFunction.cpp (original)
+++ cfe/trunk/lib/CodeGen/CodeGenFunction.cpp Fri Feb 17 18:37:07 2012
@@ -428,9 +428,8 @@
   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();





More information about the cfe-commits mailing list