9#ifndef LLVM_CLANG_ANALYSIS_SCALABLE_ANALYSES_UNSAFEBUFFERUSAGE_UNSAFEBUFFERUSAGE_H
10#define LLVM_CLANG_ANALYSIS_SCALABLE_ANALYSES_UNSAFEBUFFERUSAGE_UNSAFEBUFFERUSAGE_H
15#include "llvm/ADT/iterator_range.h"
40class EntityPointerLevel {
42 unsigned PointerLevel;
47 EntityPointerLevel(
EntityId Entity,
unsigned PointerLevel)
48 : Entity(Entity), PointerLevel(PointerLevel) {}
55 return Entity ==
Other.Entity && PointerLevel ==
Other.PointerLevel;
59 return !(*
this ==
Other);
63 return std::tie(Entity, PointerLevel) <
71 const EntityPointerLevel &R)
const {
84 std::set<EntityPointerLevel, EntityPointerLevel::Comparator>;
103 return UnsafeBuffers.find(
V);
107 return llvm::make_range(UnsafeBuffers.equal_range(Entity));
Lightweight opaque handle representing an entity in an EntityIdTable.
An EntityPointerLevel represents a level of the declared pointer/array type of an entity.
bool operator!=(const EntityPointerLevel &Other) const
bool operator==(const EntityPointerLevel &Other) const
unsigned getPointerLevel() const
bool operator<(const EntityPointerLevel &Other) const
EntityId getEntity() const
friend class UnsafeBufferUsageEntitySummary
friend class UnsafeBufferUsageTUSummaryBuilder
Base class for analysis-specific summary data.
Uniquely identifies an analysis summary.
size_t getNumUnsafeBuffers()
SummaryName getSummaryName() const override
const_iterator end() const
EntityPointerLevelSet::const_iterator const_iterator
llvm::iterator_range< const_iterator > getSubsetOf(EntityId Entity) const
const_iterator find(const EntityPointerLevel &V) const
friend class UnsafeBufferUsageTUSummaryBuilder
const_iterator begin() const
std::set< EntityPointerLevel, EntityPointerLevel::Comparator > EntityPointerLevelSet
@ Other
Other implicit parameter.
bool operator()(const EntityId &L, const EntityPointerLevel &R) const
bool operator()(const EntityPointerLevel &L, const EntityPointerLevel &R) const
bool operator()(const EntityPointerLevel &L, const EntityId &R) const