[clang-tidy] Use SmallPtrSet directly instead of SmallSet (NFC) (#154679)
I'm trying to remove the redirection in SmallSet.h:
template <typename PointeeType, unsigned N>
class SmallSet<PointeeType*, N> : public SmallPtrSet<PointeeType*, N>
{};
to make it clear that we are using SmallPtrSet. There are only
handful places that rely on this redirection.
This patch replaces SmallSet to SmallPtrSet where the element type is
a pointer.
This commit is contained in:
parent
f5f6613af6
commit
ec07d8e941
@ -1575,6 +1575,10 @@ template <typename T, std::size_t N = SmallDataStructureSize>
|
||||
using ParamToSmallSetMap =
|
||||
llvm::DenseMap<const ParmVarDecl *, llvm::SmallSet<T, N>>;
|
||||
|
||||
template <typename T, std::size_t N = SmallDataStructureSize>
|
||||
using ParamToSmallPtrSetMap =
|
||||
llvm::DenseMap<const ParmVarDecl *, llvm::SmallPtrSet<T, N>>;
|
||||
|
||||
/// Returns whether the sets mapped to the two elements in the map have at
|
||||
/// least one element in common.
|
||||
template <typename MapTy, typename ElemTy>
|
||||
@ -1699,7 +1703,7 @@ public:
|
||||
/// Implements the heuristic that marks two parameters related if the same
|
||||
/// member is accessed (referred to) inside the current function's body.
|
||||
class AccessedSameMemberOf {
|
||||
ParamToSmallSetMap<const Decl *> AccessedMembers;
|
||||
ParamToSmallPtrSetMap<const Decl *> AccessedMembers;
|
||||
|
||||
public:
|
||||
void setup(const FunctionDecl *FD) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user