aboutsummaryrefslogtreecommitdiff
path: root/lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2012-10-12 22:56:45 +0000
committerTed Kremenek <kremenek@apple.com>2012-10-12 22:56:45 +0000
commit74616824108151e139d84338db609cc32f065c05 (patch)
treee5ef70d4d9c424bde8234893dbba8f4d757f228f /lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp
parentd0f3d7148ca761fda2243528b2b62f916770f546 (diff)
Move assertion to not crash tests.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165842 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp')
-rw-r--r--lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp b/lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp
index c84365e4a9..36e17faf4f 100644
--- a/lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp
+++ b/lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp
@@ -2857,7 +2857,6 @@ void RetainCountChecker::checkSummary(const RetainSummary &Summ,
// Consult the summary for the return value.
RetEffect RE = Summ.getRetEffect();
- assert(CallOrMsg.getOriginExpr());
if (RE.getKind() == RetEffect::OwnedWhenTrackedReceiver) {
if (ReceiverIsTracked)
@@ -2900,7 +2899,7 @@ void RetainCountChecker::checkSummary(const RetainSummary &Summ,
SymbolRef Sym = state->getSVal(Ex, C.getLocationContext()).getAsSymbol();
if (!Sym)
break;
-
+ assert(Ex);
// Use GetReturnType in order to give [NSFoo alloc] the type NSFoo *.
QualType ResultTy = GetReturnType(Ex, C.getASTContext());
state = setRefBinding(state, Sym, RefVal::makeNotOwned(RE.getObjKind(),