13#ifndef LLVM_CLANG_STATICANALYZER_CORE_PATHSENSITIVE_ENVIRONMENT_H
14#define LLVM_CLANG_STATICANALYZER_CORE_PATHSENSITIVE_ENVIRONMENT_H
19#include "llvm/ADT/ImmutableMap.h"
43 static void Profile(llvm::FoldingSetNodeID &ID,
49 void Profile(llvm::FoldingSetNodeID &ID)
const {
59 using BindingsTy = llvm::ImmutableMap<EnvironmentEntry, SVal>;
61 BindingsTy ExprBindings;
63 Environment(BindingsTy eb) : ExprBindings(eb) {}
79 static void Profile(llvm::FoldingSetNodeID& ID,
const Environment* env) {
80 env->ExprBindings.Profile(ID);
85 void Profile(llvm::FoldingSetNodeID& ID)
const {
90 return ExprBindings == RHS.ExprBindings;
95 unsigned int Space = 0,
bool IsDot =
false)
const;
100 using FactoryTy = Environment::BindingsTy::Factory;
This file defines AnalysisDeclContext, a class that manages the analysis context data for context sen...
Holds long-lived AST nodes (such as types and decls) that can be referred to throughout the semantic ...
This represents one expression.
Stmt - This represents one statement.
An entry in the environment consists of a Stmt and an LocationContext.
const Expr * getExpr() const
const LocationContext * getLocationContext() const
EnvironmentEntry(const Expr *E, const LocationContext *L)
void Profile(llvm::FoldingSetNodeID &ID) const
static void Profile(llvm::FoldingSetNodeID &ID, const EnvironmentEntry &E)
Profile an EnvironmentEntry for inclusion in a FoldingSet.
Environment getInitialEnvironment()
Environment bindExpr(Environment Env, const EnvironmentEntry &E, SVal V, bool Invalidate)
Bind a symbolic value to the given environment entry.
Environment removeDeadBindings(Environment Env, SymbolReaper &SymReaper, ProgramStateRef state)
EnvironmentManager(llvm::BumpPtrAllocator &Allocator)
An immutable map from EnvironmentEntries to SVals.
SVal getSVal(const EnvironmentEntry &E, SValBuilder &svalBuilder) const
Fetches the current binding of the expression in the Environment.
void Profile(llvm::FoldingSetNodeID &ID) const
Profile - Used to profile the contents of this object for inclusion in a FoldingSet.
bool operator==(const Environment &RHS) const
static void Profile(llvm::FoldingSetNodeID &ID, const Environment *env)
Profile - Profile the contents of an Environment object for use in a FoldingSet.
friend class EnvironmentManager
void printJson(raw_ostream &Out, const ASTContext &Ctx, const LocationContext *LCtx=nullptr, const char *NL="\n", unsigned int Space=0, bool IsDot=false) const
BindingsTy::iterator iterator
SVal - This represents a symbolic expression, which can be either an L-value or an R-value.
A class responsible for cleaning up unused symbols.
IntrusiveRefCntPtr< const ProgramState > ProgramStateRef
The JSON file list parser is used to communicate input to InstallAPI.