r188587 - Use the number of parameters in the actual method or function to determine the CallEffects size.
Ted Kremenek
kremenek at apple.com
Fri Aug 16 16:14:22 PDT 2013
Author: kremenek
Date: Fri Aug 16 18:14:22 2013
New Revision: 188587
URL: http://llvm.org/viewvc/llvm-project?rev=188587&view=rev
Log:
Use the number of parameters in the actual method or function to determine the CallEffects size.
Modified:
cfe/trunk/lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp
Modified: cfe/trunk/lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp?rev=188587&r1=188586&r2=188587&view=diff
==============================================================================
--- cfe/trunk/lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp (original)
+++ cfe/trunk/lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp Fri Aug 16 18:14:22 2013
@@ -318,12 +318,6 @@ public:
return DefaultArgEffect;
}
- /// Return the number of argument effects. This is O(n) in the number
- /// of arguments.
- unsigned getNumArgs() const {
- return std::distance(Args.begin(), Args.end());
- }
-
void addArg(ArgEffects::Factory &af, unsigned idx, ArgEffect e) {
Args = af.add(Args, idx, e);
}
@@ -3689,7 +3683,7 @@ namespace clang { namespace ento { names
const RetainSummary *S = M.get ## KIND ## Summary(D);\
CallEffects CE(S->getRetEffect());\
CE.Receiver = S->getReceiverEffect();\
- unsigned N = S->getNumArgs();\
+ unsigned N = D->param_size();\
for (unsigned i = 0; i < N; ++i) {\
CE.Args.push_back(S->getArg(i));\
}
More information about the cfe-commits
mailing list