summaryrefslogtreecommitdiffstats
path: root/clang/lib
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
commitbe4008472de1e329eefc744e08d23df4e278a907 (patch)
treea606a19cc11ba19828fc710e0bdb0a33761f3c31 /clang/lib
parent26a3661a10653ee186482d23b4efc94ed1eaf6c8 (diff)
downloadbcm5719-llvm-be4008472de1e329eefc744e08d23df4e278a907.tar.gz
bcm5719-llvm-be4008472de1e329eefc744e08d23df4e278a907.zip
Move assertion to not crash tests.
llvm-svn: 165842
Diffstat (limited to 'clang/lib')
-rw-r--r--clang/lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/clang/lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp b/clang/lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp
index c84365e4a9e..36e17faf4f8 100644
--- a/clang/lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp
+++ b/clang/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(),
OpenPOWER on IntegriCloud