9#ifndef LLVM_CLANG_SCALABLESTATICANALYSISFRAMEWORK_ANALYSES_ENTITYPOINTERLEVEL_ENTITYPOINTERLEVEL_H
10#define LLVM_CLANG_SCALABLESTATICANALYSISFRAMEWORK_ANALYSES_ENTITYPOINTERLEVEL_ENTITYPOINTERLEVEL_H
37class EntityPointerLevel {
39 unsigned PointerLevel;
41 friend class EntityPointerLevelTranslator;
43 friend EntityPointerLevel buildEntityPointerLevel(EntityId,
unsigned);
45 explicit EntityPointerLevel(std::pair<EntityId, unsigned> Pair)
46 : Entity(Pair.first), PointerLevel(Pair.second) {}
49 EntityId getEntity()
const {
return Entity; }
50 unsigned getPointerLevel()
const {
return PointerLevel; }
52 bool operator==(
const EntityPointerLevel &Other)
const {
53 return std::tie(Entity, PointerLevel) ==
57 bool operator!=(
const EntityPointerLevel &Other)
const {
58 return !(*
this ==
Other);
61 bool operator<(
const EntityPointerLevel &Other)
const {
62 return std::tie(Entity, PointerLevel) <
69 using is_transparent = void;
70 bool operator()(
const EntityPointerLevel &L,
71 const EntityPointerLevel &R)
const {
74 bool operator()(
const EntityId &L,
const EntityPointerLevel &R)
const {
75 return L <
R.getEntity();
77 bool operator()(
const EntityPointerLevel &L,
const EntityId &R)
const {
78 return L.getEntity() <
R;
83using EntityPointerLevelSet =
84 std::set<EntityPointerLevel, EntityPointerLevel::Comparator>;
95llvm::Expected<EntityPointerLevelSet>
96translateEntityPointerLevel(
const Expr *E, ASTContext &Ctx,
101EntityPointerLevel buildEntityPointerLevel(
EntityId,
unsigned);
110llvm::Expected<EntityPointerLevel>
112 bool IsFunRet =
false);
Lightweight opaque handle representing an entity in an EntityIdTable.
bool operator!=(const CommonEntityInfo &LHS, const CommonEntityInfo &RHS)
EntityPointerLevel incrementPointerLevel(const EntityPointerLevel &E)
An EntityPointerLevel is associated with 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.