[cfe-commits] r49660 - /cfe/trunk/lib/Analysis/CFRefCount.cpp
Ted Kremenek
kremenek at apple.com
Mon Apr 14 10:45:13 PDT 2008
Author: kremenek
Date: Mon Apr 14 12:45:13 2008
New Revision: 49660
URL: http://llvm.org/viewvc/llvm-project?rev=49660&view=rev
Log:
Treat calls to unresolved functions in the CF-ref count checker as calls
to functions with NULL summaries.
Modified:
cfe/trunk/lib/Analysis/CFRefCount.cpp
Modified: cfe/trunk/lib/Analysis/CFRefCount.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Analysis/CFRefCount.cpp?rev=49660&r1=49659&r2=49660&view=diff
==============================================================================
--- cfe/trunk/lib/Analysis/CFRefCount.cpp (original)
+++ cfe/trunk/lib/Analysis/CFRefCount.cpp Mon Apr 14 12:45:13 2008
@@ -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.
More information about the cfe-commits
mailing list