diff options
author | Ted Kremenek <kremenek@apple.com> | 2008-04-14 17:45:13 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2008-04-14 17:45:13 +0000 |
commit | 7ded73c1cbb34802f67cb7df96617529d3f78145 (patch) | |
tree | 8eae44a8f7322e871d1322cde47ab7958f6b41cb /lib/Analysis/CFRefCount.cpp | |
parent | 896436ecd0c024431a1d11e2bb539d85a0dc8daa (diff) |
Treat calls to unresolved functions in the CF-ref count checker as calls
to functions with NULL summaries.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49660 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/CFRefCount.cpp')
-rw-r--r-- | lib/Analysis/CFRefCount.cpp | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/lib/Analysis/CFRefCount.cpp b/lib/Analysis/CFRefCount.cpp index df479884ed..ff8b3e5e69 100644 --- a/lib/Analysis/CFRefCount.cpp +++ b/lib/Analysis/CFRefCount.cpp @@ -657,17 +657,15 @@ void CFRefCount::EvalCall(ExplodedNodeSet<ValueState>& Dst, ValueStateManager& StateMgr = Eng.getStateManager(); - // FIXME: Support calls to things other than lval::FuncVal. At the very - // least we should stop tracking ref-state for ref-counted objects passed - // to these functions. - - assert (isa<lval::FuncVal>(L) && "Not yet implemented."); + CFRefSummary* Summ = NULL; // Get the summary. - lval::FuncVal FV = cast<lval::FuncVal>(L); - FunctionDecl* FD = FV.getDecl(); - CFRefSummary* Summ = Summaries.getSummary(FD, Eng.getContext()); + if (isa<lval::FuncVal>(L)) { + lval::FuncVal FV = cast<lval::FuncVal>(L); + FunctionDecl* FD = FV.getDecl(); + Summ = Summaries.getSummary(FD, Eng.getContext()); + } // Get the state. |