diff options
Diffstat (limited to 'clang/lib/StaticAnalyzer/Core/Store.cpp')
| -rw-r--r-- | clang/lib/StaticAnalyzer/Core/Store.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/clang/lib/StaticAnalyzer/Core/Store.cpp b/clang/lib/StaticAnalyzer/Core/Store.cpp index 05feb1325c93..2bcdb0faf5da 100644 --- a/clang/lib/StaticAnalyzer/Core/Store.cpp +++ b/clang/lib/StaticAnalyzer/Core/Store.cpp @@ -314,10 +314,7 @@ static const CXXRecordDecl *getCXXRecordType(const MemRegion *MR) { return nullptr; } -SVal StoreManager::attemptDownCast(SVal Base, QualType TargetType, - bool &Failed) { - Failed = false; - +Optional<SVal> StoreManager::evalBaseToDerived(SVal Base, QualType TargetType) { const MemRegion *MR = Base.getAsRegion(); if (!MR) return UnknownVal(); @@ -392,7 +389,9 @@ SVal StoreManager::attemptDownCast(SVal Base, QualType TargetType, } // We failed if the region we ended up with has perfect type info. - Failed = isa<TypedValueRegion>(MR); + if (isa<TypedValueRegion>(MR)) + return None; + return UnknownVal(); } |
