summaryrefslogtreecommitdiffstats
path: root/clang/lib/Analysis/CFRefCount.cpp
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2008-04-14 17:45:13 +0000
committerTed Kremenek <kremenek@apple.com>2008-04-14 17:45:13 +0000
commit12e721a7284c19a29750bdf004fd0654e79cdce2 (patch)
treee4347f5ef2b81a3df7f33d7bd622bc537923d92f /clang/lib/Analysis/CFRefCount.cpp
parent69a4df4cb78cc1718c9ed61de4ffbf9d1cf6f416 (diff)
downloadbcm5719-llvm-12e721a7284c19a29750bdf004fd0654e79cdce2.tar.gz
bcm5719-llvm-12e721a7284c19a29750bdf004fd0654e79cdce2.zip
Treat calls to unresolved functions in the CF-ref count checker as calls
to functions with NULL summaries. llvm-svn: 49660
Diffstat (limited to 'clang/lib/Analysis/CFRefCount.cpp')
-rw-r--r--clang/lib/Analysis/CFRefCount.cpp14
1 files changed, 6 insertions, 8 deletions
diff --git a/clang/lib/Analysis/CFRefCount.cpp b/clang/lib/Analysis/CFRefCount.cpp
index df479884ed5..ff8b3e5e697 100644
--- a/clang/lib/Analysis/CFRefCount.cpp
+++ b/clang/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.
OpenPOWER on IntegriCloud