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
diff --git a/lib/Analysis/CFRefCount.cpp b/lib/Analysis/CFRefCount.cpp
index df47988..ff8b3e5 100644
--- a/lib/Analysis/CFRefCount.cpp
+++ b/lib/Analysis/CFRefCount.cpp
@@ -657,17 +657,15 @@
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.