Go to the documentation of this file.
13 #ifndef LLVM_CLANG_STATICANALYZER_CORE_PATHSENSITIVE_ENVIRONMENT_H
14 #define LLVM_CLANG_STATICANALYZER_CORE_PATHSENSITIVE_ENVIRONMENT_H
19 #include "llvm/ADT/ImmutableMap.h"
36 const StackFrameContext *> {
60 using BindingsTy = llvm::ImmutableMap<EnvironmentEntry, SVal>;
62 BindingsTy ExprBindings;
81 env->ExprBindings.Profile(
ID);
91 return ExprBindings == RHS.ExprBindings;
96 unsigned int Space = 0,
bool IsDot =
false)
const;
101 using FactoryTy = Environment::BindingsTy::Factory;
125 #endif // LLVM_CLANG_STATICANALYZER_CORE_PATHSENSITIVE_ENVIRONMENT_H
It wraps the AnalysisDeclContext to represent both the call stack with the help of StackFrameContext ...
const LocationContext * getLocationContext() const
static void Profile(llvm::FoldingSetNodeID &ID, const EnvironmentEntry &E)
Profile an EnvironmentEntry for inclusion in a FoldingSet.
EnvironmentManager(llvm::BumpPtrAllocator &Allocator)
Environment bindExpr(Environment Env, const EnvironmentEntry &E, SVal V, bool Invalidate)
Bind a symbolic value to the given environment entry.
void Profile(llvm::FoldingSetNodeID &ID) const
Holds long-lived AST nodes (such as types and decls) that can be referred to throughout the semantic ...
BindingsTy::iterator iterator
A class responsible for cleaning up unused symbols.
SVal getSVal(const EnvironmentEntry &E, SValBuilder &svalBuilder) const
Fetches the current binding of the expression in the Environment.
const Stmt * getStmt() const
and static some checkers Checker The latter are built on top of the former via the Checker and CheckerVisitor and attempts to isolate them from much of the gore of the internal analysis the analyzer is basically a source code simulator that traces out possible paths of execution The state of the and the combination of state and program point is a node in an exploded which has the entry program point and initial state
Environment removeDeadBindings(Environment Env, SymbolReaper &SymReaper, ProgramStateRef state)
static void Profile(llvm::FoldingSetNodeID &ID, const Environment *env)
Profile - Profile the contents of an Environment object for use in a FoldingSet.
EnvironmentEntry(const Stmt *s, const LocationContext *L)
void Profile(llvm::FoldingSetNodeID &ID) const
Profile - Used to profile the contents of this object for inclusion in a FoldingSet.
Stmt - This represents one statement.
void printJson(raw_ostream &Out, const ASTContext &Ctx, const LocationContext *LCtx=nullptr, const char *NL="\n", unsigned int Space=0, bool IsDot=false) const
__device__ __2f16 float bool s
SVal - This represents a symbolic expression, which can be either an L-value or an R-value.
An immutable map from EnvironemntEntries to SVals.
Environment getInitialEnvironment()
bool operator==(const Environment &RHS) const
An entry in the environment consists of a Stmt and an LocationContext.