diff --git a/clang-tools-extra/clang-tidy/bugprone/InfiniteLoopCheck.cpp b/clang-tools-extra/clang-tidy/bugprone/InfiniteLoopCheck.cpp index 4b495e387700..cda9c4e7a6e5 100644 --- a/clang-tools-extra/clang-tidy/bugprone/InfiniteLoopCheck.cpp +++ b/clang-tools-extra/clang-tidy/bugprone/InfiniteLoopCheck.cpp @@ -188,7 +188,7 @@ static bool isKnownToHaveValue(const Expr &Cond, const ASTContext &Ctx, /// \return true iff all `CallExprs` visited have callees; false otherwise /// indicating there is an unresolved indirect call. static bool populateCallees(const Stmt *StmtNode, - llvm::SmallSet &Callees) { + llvm::SmallPtrSet &Callees) { if (const auto *Call = dyn_cast(StmtNode)) { const Decl *Callee = Call->getDirectCallee(); @@ -212,7 +212,7 @@ static bool populateCallees(const Stmt *StmtNode, /// returns true iff `SCC` contains `Func` and its' function set overlaps with /// `Callees` static bool overlap(ArrayRef SCC, - const llvm::SmallSet &Callees, + const llvm::SmallPtrSet &Callees, const Decl *Func) { bool ContainsFunc = false, Overlap = false; @@ -264,7 +264,7 @@ static bool hasRecursionOverStaticLoopCondVariables(const Expr *Cond, if (!hasStaticLocalVariable(Cond)) return false; - llvm::SmallSet CalleesInLoop; + llvm::SmallPtrSet CalleesInLoop; if (!populateCallees(LoopStmt, CalleesInLoop)) { // If there are unresolved indirect calls, we assume there could diff --git a/clang-tools-extra/clangd/AST.cpp b/clang-tools-extra/clangd/AST.cpp index 82aee4c84d07..2f46ecc92576 100644 --- a/clang-tools-extra/clangd/AST.cpp +++ b/clang-tools-extra/clangd/AST.cpp @@ -985,7 +985,7 @@ resolveForwardingParameters(const FunctionDecl *D, unsigned MaxDepth) { // Recurse on pack parameters size_t Depth = 0; const FunctionDecl *CurrentFunction = D; - llvm::SmallSet SeenTemplates; + llvm::SmallPtrSet SeenTemplates; if (const auto *Template = D->getPrimaryTemplate()) { SeenTemplates.insert(Template); } diff --git a/clang-tools-extra/clangd/XRefs.cpp b/clang-tools-extra/clangd/XRefs.cpp index 11ee51072dcc..a253a630a48c 100644 --- a/clang-tools-extra/clangd/XRefs.cpp +++ b/clang-tools-extra/clangd/XRefs.cpp @@ -1876,7 +1876,7 @@ static void fillSubTypes(const SymbolID &ID, }); } -using RecursionProtectionSet = llvm::SmallSet; +using RecursionProtectionSet = llvm::SmallPtrSet; // Extracts parents from AST and populates the type hierarchy item. static void fillSuperTypes(const CXXRecordDecl &CXXRD, llvm::StringRef TUPath, diff --git a/clang-tools-extra/clangd/refactor/tweaks/ExtractFunction.cpp b/clang-tools-extra/clangd/refactor/tweaks/ExtractFunction.cpp index 134ae8928830..bc9a79023250 100644 --- a/clang-tools-extra/clangd/refactor/tweaks/ExtractFunction.cpp +++ b/clang-tools-extra/clangd/refactor/tweaks/ExtractFunction.cpp @@ -181,7 +181,7 @@ struct ExtractionZone { bool requiresHoisting(const SourceManager &SM, const HeuristicResolver *Resolver) const { // First find all the declarations that happened inside extraction zone. - llvm::SmallSet DeclsInExtZone; + llvm::SmallPtrSet DeclsInExtZone; for (auto *RootStmt : RootStmts) { findExplicitReferences( RootStmt,