clang 17.0.0git
Namespaces | Functions | Variables
DataflowEnvironment.cpp File Reference
#include "clang/Analysis/FlowSensitive/DataflowEnvironment.h"
#include "clang/AST/Decl.h"
#include "clang/AST/DeclCXX.h"
#include "clang/AST/Type.h"
#include "clang/Analysis/FlowSensitive/DataflowLattice.h"
#include "clang/Analysis/FlowSensitive/Value.h"
#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/DenseSet.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/Support/Casting.h"
#include "llvm/Support/ErrorHandling.h"
#include <cassert>
#include <memory>
#include <utility>

Go to the source code of this file.

Namespaces

namespace  clang
 
namespace  clang::dataflow
 Dataflow Directional Tag Classes.
 

Functions

template<typename K , typename V >
llvm::DenseMap< K, Vclang::dataflow::intersectDenseMaps (const llvm::DenseMap< K, V > &Map1, const llvm::DenseMap< K, V > &Map2)
 Returns a map consisting of key-value entries that are present in both maps.
 
static bool clang::dataflow::compareDistinctValues (QualType Type, Value &Val1, const Environment &Env1, Value &Val2, const Environment &Env2, Environment::ValueModel &Model)
 
static Valueclang::dataflow::mergeDistinctValues (QualType Type, Value &Val1, const Environment &Env1, Value &Val2, const Environment &Env2, Environment &MergedEnv, Environment::ValueModel &Model)
 Attempts to merge distinct values Val1 and Val2 in Env1 and Env2, respectively, of the same type Type.
 
static Valueclang::dataflow::widenDistinctValues (QualType Type, Value &Prev, const Environment &PrevEnv, Value &Current, Environment &CurrentEnv, Environment::ValueModel &Model)
 
static void clang::dataflow::insertIfGlobal (const Decl &D, llvm::DenseSet< const VarDecl * > &Vars)
 Initializes a global storage value.
 
static void clang::dataflow::insertIfFunction (const Decl &D, llvm::DenseSet< const FunctionDecl * > &Funcs)
 
static void clang::dataflow::getFieldsGlobalsAndFuncs (const Decl &D, llvm::DenseSet< const FieldDecl * > &Fields, llvm::DenseSet< const VarDecl * > &Vars, llvm::DenseSet< const FunctionDecl * > &Funcs)
 
static void clang::dataflow::getFieldsGlobalsAndFuncs (const Stmt &S, llvm::DenseSet< const FieldDecl * > &Fields, llvm::DenseSet< const VarDecl * > &Vars, llvm::DenseSet< const FunctionDecl * > &Funcs)
 Traverses S and inserts into Fields, Vars and Funcs any fields, global variables and functions that are declared in or referenced from sub-statements.
 
AggregateStorageLocation * clang::dataflow::getImplicitObjectLocation (const CXXMemberCallExpr &MCE, const Environment &Env)
 Returns the storage location for the implicit object of a CXXMemberCallExpr, or null if none is defined in the environment.
 
AggregateStorageLocation * clang::dataflow::getBaseObjectLocation (const MemberExpr &ME, const Environment &Env)
 Returns the storage location for the base object of a MemberExpr, or null if none is defined in the environment.
 

Variables

static constexpr int clang::dataflow::MaxCompositeValueDepth = 3
 
static constexpr int clang::dataflow::MaxCompositeValueSize = 1000