clang 19.0.0git
Namespaces | Macros | 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/ExprCXX.h"
#include "clang/AST/RecursiveASTVisitor.h"
#include "clang/AST/Stmt.h"
#include "clang/AST/Type.h"
#include "clang/Analysis/FlowSensitive/ASTOps.h"
#include "clang/Analysis/FlowSensitive/DataflowAnalysisContext.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/MapVector.h"
#include "llvm/ADT/PointerUnion.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/ScopeExit.h"
#include "llvm/Support/ErrorHandling.h"
#include <algorithm>
#include <cassert>
#include <memory>
#include <utility>

Go to the source code of this file.

Namespaces

namespace  clang
 The JSON file list parser is used to communicate input to InstallAPI.
 
namespace  clang::dataflow
 Dataflow Directional Tag Classes.
 

Macros

#define DEBUG_TYPE   "dataflow"
 

Functions

static llvm::DenseMap< const ValueDecl *, StorageLocation * > clang::dataflow::intersectDeclToLoc (const llvm::DenseMap< const ValueDecl *, StorageLocation * > &DeclToLoc1, const llvm::DenseMap< const ValueDecl *, StorageLocation * > &DeclToLoc2)
 Returns a map consisting of key-value entries that are present in both maps.
 
template<typename MapT >
MapT clang::dataflow::joinExprMaps (const MapT &Map1, const MapT &Map2)
 
static bool clang::dataflow::equateUnknownValues (Value::Kind K)
 
static bool clang::dataflow::compareDistinctValues (QualType Type, Value &Val1, const Environment &Env1, Value &Val2, const Environment &Env2, Environment::ValueModel &Model)
 
static Valueclang::dataflow::joinDistinctValues (QualType Type, Value &Val1, const Environment &Env1, Value &Val2, const Environment &Env2, Environment &JoinedEnv, Environment::ValueModel &Model)
 Attempts to join distinct values Val1 and Val2 in Env1 and Env2, respectively, of the same type Type.
 
static WidenResult clang::dataflow::widenDistinctValues (QualType Type, Value &Prev, const Environment &PrevEnv, Value &Current, Environment &CurrentEnv, Environment::ValueModel &Model)
 
template<typename Key >
bool clang::dataflow::compareKeyToValueMaps (const llvm::MapVector< Key, Value * > &Map1, const llvm::MapVector< Key, Value * > &Map2, const Environment &Env1, const Environment &Env2, Environment::ValueModel &Model)
 
static llvm::MapVector< const StorageLocation *, Value * > clang::dataflow::joinLocToVal (const llvm::MapVector< const StorageLocation *, Value * > &LocToVal, const llvm::MapVector< const StorageLocation *, Value * > &LocToVal2, const Environment &Env1, const Environment &Env2, Environment &JoinedEnv, Environment::ValueModel &Model)
 
template<typename Key >
llvm::MapVector< Key, Value * > clang::dataflow::widenKeyToValueMap (const llvm::MapVector< Key, Value * > &CurMap, const llvm::MapVector< Key, Value * > &PrevMap, Environment &CurEnv, const Environment &PrevEnv, Environment::ValueModel &Model, LatticeEffect &Effect)
 
RecordStorageLocation * 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.
 
RecordStorageLocation * 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
 

Macro Definition Documentation

◆ DEBUG_TYPE

#define DEBUG_TYPE   "dataflow"

Definition at line 38 of file DataflowEnvironment.cpp.