r312525 - Removed dead code (PR34467). NFCI.

Simon Pilgrim via cfe-commits cfe-commits at lists.llvm.org
Tue Sep 5 03:37:13 PDT 2017


Author: rksimon
Date: Tue Sep  5 03:37:13 2017
New Revision: 312525

URL: http://llvm.org/viewvc/llvm-project?rev=312525&view=rev
Log:
Removed dead code (PR34467). NFCI.

The for loop already checks that Idx < NumOfArgs.

Modified:
    cfe/trunk/lib/StaticAnalyzer/Core/CallEvent.cpp

Modified: cfe/trunk/lib/StaticAnalyzer/Core/CallEvent.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Core/CallEvent.cpp?rev=312525&r1=312524&r2=312525&view=diff
==============================================================================
--- cfe/trunk/lib/StaticAnalyzer/Core/CallEvent.cpp (original)
+++ cfe/trunk/lib/StaticAnalyzer/Core/CallEvent.cpp Tue Sep  5 03:37:13 2017
@@ -97,9 +97,6 @@ bool CallEvent::hasNonNullArgumentsWithT
   for (CallEvent::param_type_iterator I = param_type_begin(),
                                       E = param_type_end();
        I != E && Idx < NumOfArgs; ++I, ++Idx) {
-    if (NumOfArgs <= Idx)
-      break;
-
     // If the parameter is 0, it's harmless.
     if (getArgSVal(Idx).isZeroConstant())
       continue;




More information about the cfe-commits mailing list