9#ifndef LLVM_CLANG_SCALABLESTATICANALYSIS_ANALYSES_ENTITYPOINTERLEVEL_ENTITYPOINTERLEVEL_H
10#define LLVM_CLANG_SCALABLESTATICANALYSIS_ANALYSES_ENTITYPOINTERLEVEL_ENTITYPOINTERLEVEL_H
14#include "llvm/ADT/SmallVector.h"
48class EntityPointerLevel {
50 unsigned PointerLevel;
56 explicit EntityPointerLevel(std::pair<EntityId, unsigned> Pair)
57 : Entity(Pair.first), PointerLevel(Pair.second) {}
60 EntityId getEntity()
const {
return Entity; }
61 unsigned getPointerLevel()
const {
return PointerLevel; }
64 return std::tie(Entity, PointerLevel) ==
69 return !(*
this ==
Other);
73 return std::tie(Entity, PointerLevel) <
80 using is_transparent = void;
81 bool operator()(
const EntityPointerLevel &L,
82 const EntityPointerLevel &R)
const {
85 bool operator()(
const EntityId &L,
const EntityPointerLevel &R)
const {
86 return L < R.getEntity();
88 bool operator()(
const EntityPointerLevel &L,
const EntityId &R)
const {
89 return L.getEntity() < R;
94using EntityPointerLevelSet =
95 std::set<EntityPointerLevel, EntityPointerLevel::Comparator>;
108 TUSummaryExtractor &Extractor);
115 TUSummaryExtractor &Extractor);
120 TUSummaryExtractor &Extractor);
124toEntityPointerLevel(
const DeclPointerLevel &DPL,
ASTContext &Ctx,
125 TUSummaryExtractor &Extractor);
137 bool IsFunRet =
false);
148 bool IsFunRet =
false);
Holds long-lived AST nodes (such as types and decls) that can be referred to throughout the semantic ...
This represents one expression.
This represents a decl that may have a name.
Lightweight opaque handle representing an entity in an EntityIdTable.
EntityPointerLevel buildEntityPointerLevel(EntityId, unsigned)
An EntityPointerLevel is associated with a level of the declared pointer/array type of an entity.
DeclPointerLevel createDeclPointerLevel(const NamedDecl *ND, bool IsFunRet=false)
Create an DeclPointerLevel (DPL) from a NamedDecl of a pointer/array type.
DeclPointerLevelVec elaborateHigherDeclPointerLevels(const DeclPointerLevel &DPL)
llvm::Expected< EntityPointerLevel > createEntityPointerLevel(const NamedDecl *ND, TUSummaryExtractor &Extractor, bool IsFunRet=false)
Create an EntityPointerLevel (EPL) from a NamedDecl of a pointer/array type.
llvm::SmallVector< DeclPointerLevel, 2 > DeclPointerLevelVec
bool operator==(const CallGraphNode::CallRecord &LHS, const CallGraphNode::CallRecord &RHS)
bool operator<(DeclarationName LHS, DeclarationName RHS)
Ordering on two declaration names.
bool operator!=(CanQual< T > x, CanQual< U > y)
@ Other
Other implicit parameter.