diff options
author | John McCall <rjmccall@apple.com> | 2011-04-06 09:02:12 +0000 |
---|---|---|
committer | John McCall <rjmccall@apple.com> | 2011-04-06 09:02:12 +0000 |
commit | 98b8f16a0b056919f24206a8a3ca86f9ea75fa34 (patch) | |
tree | eb5afad73d2e8e0bb10408a04f7bdcc70d9bc4b5 /lib/StaticAnalyzer/Core/CFRefCount.cpp | |
parent | 018e02cc19d2635416a8b2b76f3c8faf6c361afb (diff) |
When updating the retain summary based on {cf,ns}_consumed attributes,
be sure to consume the argument index that actually had the attribute
rather than always the first. rdar://problem/9234108
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128998 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/StaticAnalyzer/Core/CFRefCount.cpp')
-rw-r--r-- | lib/StaticAnalyzer/Core/CFRefCount.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/StaticAnalyzer/Core/CFRefCount.cpp b/lib/StaticAnalyzer/Core/CFRefCount.cpp index 416e1209ae..5131c73925 100644 --- a/lib/StaticAnalyzer/Core/CFRefCount.cpp +++ b/lib/StaticAnalyzer/Core/CFRefCount.cpp @@ -1201,7 +1201,7 @@ RetainSummaryManager::updateSummaryFromAnnotations(RetainSummary &Summ, // Effects on the parameters. unsigned parm_idx = 0; for (FunctionDecl::param_const_iterator pi = FD->param_begin(), - pe = FD->param_end(); pi != pe; ++pi) { + pe = FD->param_end(); pi != pe; ++pi, ++parm_idx) { const ParmVarDecl *pd = *pi; if (pd->getAttr<NSConsumedAttr>()) { if (!GCEnabled) |