#include "clang/Analysis/FlowSensitive/ASTOps.h"
#include "clang/AST/ComputeDependence.h"
#include "clang/AST/Decl.h"
#include "clang/AST/DeclBase.h"
#include "clang/AST/DeclCXX.h"
#include "clang/AST/Expr.h"
#include "clang/AST/ExprCXX.h"
#include "clang/AST/Stmt.h"
#include "clang/AST/Type.h"
#include "clang/Analysis/FlowSensitive/StorageLocation.h"
#include "clang/Basic/LLVM.h"
#include "llvm/ADT/DenseSet.h"
#include "llvm/ADT/STLExtras.h"
#include <cassert>
#include <iterator>
#include <vector>
#define DEBUG_TYPE …
namespace clang::dataflow {
const Expr &ignoreCFGOmittedNodes(const Expr &E) { … }
const Stmt &ignoreCFGOmittedNodes(const Stmt &S) { … }
static void getFieldsFromClassHierarchy(QualType Type, FieldSet &Fields) { … }
FieldSet getObjectFields(QualType Type) { … }
bool containsSameFields(const FieldSet &Fields,
const RecordStorageLocation::FieldToLoc &FieldLocs) { … }
template <class InitListT>
static std::vector<const FieldDecl *>
getFieldsForInitListExpr(const InitListT *InitList) { … }
RecordInitListHelper::RecordInitListHelper(const InitListExpr *InitList)
: … { … }
RecordInitListHelper::RecordInitListHelper(
const CXXParenListInitExpr *ParenInitList)
: … { … }
RecordInitListHelper::RecordInitListHelper(
QualType Ty, std::vector<const FieldDecl *> Fields,
ArrayRef<Expr *> Inits) { … }
static void insertIfGlobal(const Decl &D,
llvm::DenseSet<const VarDecl *> &Globals) { … }
static void insertIfLocal(const Decl &D,
llvm::DenseSet<const VarDecl *> &Locals) { … }
static void insertIfFunction(const Decl &D,
llvm::DenseSet<const FunctionDecl *> &Funcs) { … }
static MemberExpr *getMemberForAccessor(const CXXMemberCallExpr &C) { … }
class ReferencedDeclsVisitor
: public AnalysisASTVisitor<ReferencedDeclsVisitor> { … };
ReferencedDecls getReferencedDecls(const FunctionDecl &FD) { … }
ReferencedDecls getReferencedDecls(const Stmt &S) { … }
}