diff options
author | Anna Zaks <ganna@apple.com> | 2012-07-30 20:31:29 +0000 |
---|---|---|
committer | Anna Zaks <ganna@apple.com> | 2012-07-30 20:31:29 +0000 |
commit | 2d18419a7c8f9a2975d4ed74a202de6467308ad1 (patch) | |
tree | 464106fbed3a6d596f46a672e71ad907345084ea /lib/StaticAnalyzer/Core/ProgramState.cpp | |
parent | 3738db9445b60d6d7cab5367122308f5f2c302fc (diff) |
[analyzer] Very simple ObjC instance method inlining
- Retrieves the type of the object/receiver from the state.
- Binds self during stack setup.
- Only explores the path on which the method is inlined (no
bifurcation to explore the path on which the method is not inlined).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160991 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/StaticAnalyzer/Core/ProgramState.cpp')
-rw-r--r-- | lib/StaticAnalyzer/Core/ProgramState.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/StaticAnalyzer/Core/ProgramState.cpp b/lib/StaticAnalyzer/Core/ProgramState.cpp index 6adc18c67c..20f1e226b8 100644 --- a/lib/StaticAnalyzer/Core/ProgramState.cpp +++ b/lib/StaticAnalyzer/Core/ProgramState.cpp @@ -731,3 +731,12 @@ bool ProgramState::isTainted(SymbolRef Sym, TaintTagType Kind) const { return Tainted; } + +DynamicTypeInfo ProgramState::getDynamicTypeInfo(const MemRegion *Reg) const { + if (const TypedRegion *TR = dyn_cast<TypedRegion>(Reg)) + return DynamicTypeInfo(TR->getLocationType()); + if (const SymbolicRegion *SR = dyn_cast<SymbolicRegion>(Reg)) + return DynamicTypeInfo(SR->getSymbol() + ->getType(getStateManager().getContext())); + return DynamicTypeInfo(); +} |