aboutsummaryrefslogtreecommitdiff
path: root/include/clang/StaticAnalyzer/Core/PathSensitive/ProgramState.h
diff options
context:
space:
mode:
authorAnna Zaks <ganna@apple.com>2012-07-30 20:31:29 +0000
committerAnna Zaks <ganna@apple.com>2012-07-30 20:31:29 +0000
commit2d18419a7c8f9a2975d4ed74a202de6467308ad1 (patch)
tree464106fbed3a6d596f46a672e71ad907345084ea /include/clang/StaticAnalyzer/Core/PathSensitive/ProgramState.h
parent3738db9445b60d6d7cab5367122308f5f2c302fc (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 'include/clang/StaticAnalyzer/Core/PathSensitive/ProgramState.h')
-rw-r--r--include/clang/StaticAnalyzer/Core/PathSensitive/ProgramState.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/include/clang/StaticAnalyzer/Core/PathSensitive/ProgramState.h b/include/clang/StaticAnalyzer/Core/PathSensitive/ProgramState.h
index 0d1579f368..4e92873860 100644
--- a/include/clang/StaticAnalyzer/Core/PathSensitive/ProgramState.h
+++ b/include/clang/StaticAnalyzer/Core/PathSensitive/ProgramState.h
@@ -56,6 +56,18 @@ template <typename T> struct ProgramStateTrait {
}
};
+/// \class Stores the dynamic type information.
+/// Information about type of an object at runtime. This is used by dynamic
+/// dispatch implementation.
+class DynamicTypeInfo {
+ QualType T;
+
+public:
+ DynamicTypeInfo() : T(QualType()) {}
+ DynamicTypeInfo(QualType WithType) : T(WithType) {}
+ QualType getType() {return T;}
+};
+
/// \class ProgramState
/// ProgramState - This class encapsulates:
///
@@ -313,6 +325,9 @@ public:
bool isTainted(SymbolRef Sym, TaintTagType Kind = TaintTagGeneric) const;
bool isTainted(const MemRegion *Reg, TaintTagType Kind=TaintTagGeneric) const;
+ /// Get dynamic type information for a region.
+ DynamicTypeInfo getDynamicTypeInfo(const MemRegion *Reg) const;
+
//==---------------------------------------------------------------------==//
// Accessing the Generic Data Map (GDM).
//==---------------------------------------------------------------------==//