diff options
author | Jordan Rose <jordan_rose@apple.com> | 2012-08-09 21:24:02 +0000 |
---|---|---|
committer | Jordan Rose <jordan_rose@apple.com> | 2012-08-09 21:24:02 +0000 |
commit | 2c5f8d79ed128892fa548a3308a938a3a53fbb5e (patch) | |
tree | ee6cd4b4e61f60b876678cc09b0baf2f05b190f2 /include/clang/StaticAnalyzer/Core/PathSensitive | |
parent | 6940972c33891ff5d2189fbf232dcdeee0e9daf8 (diff) |
[analyzer] A CXXBaseObjectRegion should correspond to a DIRECT base.
An ASTContext's RecordLayoutInfo can only be used to look up offsets of
direct base classes, and we need the offset to make non-symbolic bindings
in RegionStore. This change makes sure that we have one layer of
CXXBaseObjectRegion for each base we are casting through.
This was causing crashes on an internal buildbot.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161621 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/StaticAnalyzer/Core/PathSensitive')
-rw-r--r-- | include/clang/StaticAnalyzer/Core/PathSensitive/Store.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/include/clang/StaticAnalyzer/Core/PathSensitive/Store.h b/include/clang/StaticAnalyzer/Core/PathSensitive/Store.h index eb60c92113..466be9af51 100644 --- a/include/clang/StaticAnalyzer/Core/PathSensitive/Store.h +++ b/include/clang/StaticAnalyzer/Core/PathSensitive/Store.h @@ -115,7 +115,10 @@ public: virtual SVal ArrayToPointer(Loc Array) = 0; /// Evaluates DerivedToBase casts. - virtual SVal evalDerivedToBase(SVal derived, QualType basePtrType) = 0; + virtual SVal evalDerivedToBase(SVal derived, const CastExpr *Cast); + + /// Evaluates a derived-to-base cast through a single level of derivation. + virtual SVal evalDerivedToBase(SVal derived, QualType derivedPtrType) = 0; /// \brief Evaluates C++ dynamic_cast cast. /// The callback may result in the following 3 scenarios: |