diff options
author | Anna Zaks <ganna@apple.com> | 2012-08-07 05:12:24 +0000 |
---|---|---|
committer | Anna Zaks <ganna@apple.com> | 2012-08-07 05:12:24 +0000 |
commit | 8ed21ef726be89ef7151b5ff397631379bd8a537 (patch) | |
tree | 4794e502bf86b76054fd18cc9db5ff78e63f4eda /lib/StaticAnalyzer/Checkers/DynamicTypePropagation.cpp | |
parent | 387611eaf8d8f000283bed0464597bc4e082dd7f (diff) |
[analyzer] Address Jordan's review of DynamicTypePropagation.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161391 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/StaticAnalyzer/Checkers/DynamicTypePropagation.cpp')
-rw-r--r-- | lib/StaticAnalyzer/Checkers/DynamicTypePropagation.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/StaticAnalyzer/Checkers/DynamicTypePropagation.cpp b/lib/StaticAnalyzer/Checkers/DynamicTypePropagation.cpp index fec6c43dbd..d9edab8ede 100644 --- a/lib/StaticAnalyzer/Checkers/DynamicTypePropagation.cpp +++ b/lib/StaticAnalyzer/Checkers/DynamicTypePropagation.cpp @@ -75,7 +75,8 @@ void DynamicTypePropagation::checkPostCall(const CallEvent &Call, // Assume, the result of the init method has the same dynamic type as // the receiver and propagate the dynamic type info. const MemRegion *RecReg = Msg->getReceiverSVal().getAsRegion(); - assert(RecReg); + if (!RecReg) + return; DynamicTypeInfo RecDynType = State->getDynamicTypeInfo(RecReg); C.addTransition(State->addDynamicTypeInfo(RetReg, RecDynType)); break; |