diff options
author | Ted Kremenek <kremenek@apple.com> | 2009-03-09 22:46:49 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2009-03-09 22:46:49 +0000 |
commit | 0b891a343a0065485ebf3147d78c1fbfcaf74e53 (patch) | |
tree | 4f866bd8c88b34885ac2a72af951e45d90c68968 /clang/lib | |
parent | 0603222888e8fd1932c7cc45617c79fe2e023276 (diff) | |
download | bcm5719-llvm-0b891a343a0065485ebf3147d78c1fbfcaf74e53.tar.gz bcm5719-llvm-0b891a343a0065485ebf3147d78c1fbfcaf74e53.zip |
retain/release checker: Allow allocations to fail by returning nil.
llvm-svn: 66487
Diffstat (limited to 'clang/lib')
-rw-r--r-- | clang/lib/Analysis/CFRefCount.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/clang/lib/Analysis/CFRefCount.cpp b/clang/lib/Analysis/CFRefCount.cpp index b08bce1d58a..550410d66bf 100644 --- a/clang/lib/Analysis/CFRefCount.cpp +++ b/clang/lib/Analysis/CFRefCount.cpp @@ -1840,12 +1840,16 @@ void CFRefCount::EvalSummary(ExplodedNodeSet<GRState>& Dst, state.set<RefBindings>(Sym, RefVal::makeOwned(RE.getObjKind(), RetT)); state = state.BindExpr(Ex, loc::SymbolVal(Sym), false); - // FIXME: Add a flag to the checker where allocations are allowed to fail. + + // FIXME: Add a flag to the checker where allocations are assumed to + // *not fail. +#if 0 if (RE.getKind() == RetEffect::OwnedAllocatedSymbol) { bool isFeasible; state = state.Assume(loc::SymbolVal(Sym), true, isFeasible); assert(isFeasible && "Cannot assume fresh symbol is non-null."); } +#endif break; } |