9#ifndef LLVM_CLANG_SCALABLESTATICANALYSISFRAMEWORK_ANALYSES_ENTITYPOINTERLEVEL_ENTITYPOINTERLEVEL_H
10#define LLVM_CLANG_SCALABLESTATICANALYSISFRAMEWORK_ANALYSES_ENTITYPOINTERLEVEL_ENTITYPOINTERLEVEL_H
36class EntityPointerLevel {
38 unsigned PointerLevel;
40 friend class EntityPointerLevelTranslator;
43 EntityPointerLevel(EntityId Entity,
unsigned PointerLevel)
44 : Entity(Entity), PointerLevel(PointerLevel) {}
47 EntityId getEntity()
const {
return Entity; }
48 unsigned getPointerLevel()
const {
return PointerLevel; }
50 bool operator==(
const EntityPointerLevel &Other)
const {
51 return std::tie(Entity, PointerLevel) ==
55 bool operator!=(
const EntityPointerLevel &Other)
const {
56 return !(*
this ==
Other);
59 bool operator<(
const EntityPointerLevel &Other)
const {
60 return std::tie(Entity, PointerLevel) <
67 using is_transparent = void;
68 bool operator()(
const EntityPointerLevel &L,
69 const EntityPointerLevel &R)
const {
72 bool operator()(
const EntityId &L,
const EntityPointerLevel &R)
const {
73 return L <
R.getEntity();
75 bool operator()(
const EntityPointerLevel &L,
const EntityId &R)
const {
76 return L.getEntity() <
R;
81using EntityPointerLevelSet =
82 std::set<EntityPointerLevel, EntityPointerLevel::Comparator>;
93llvm::Expected<EntityPointerLevelSet>
Lightweight opaque handle representing an entity in an EntityIdTable.
Uniquely identifies an entity in a program.
bool operator!=(const CommonEntityInfo &LHS, const CommonEntityInfo &RHS)
EntityPointerLevel buildEntityPointerLevel(EntityId, unsigned)
llvm::Expected< EntityPointerLevelSet > translateEntityPointerLevel(const Expr *E, ASTContext &Ctx, std::function< EntityId(EntityName EN)> AddEntity)
An EntityPointerLevel represents a level of the declared pointer/array type of an entity.
bool operator==(const ValueType &a, const ValueType &b)
bool operator<(DeclarationName LHS, DeclarationName RHS)
Ordering on two declaration names.
@ Other
Other implicit parameter.
int const char * function