[clang-tools-extra] [clang-tidy] Prefer the faster LLVM ADT sets and maps over `std::` ones (PR #174357)

Carlos Galvez via cfe-commits cfe-commits at lists.llvm.org
Tue Jan 6 12:06:40 PST 2026


================
@@ -84,12 +82,12 @@ class UnusedParametersCheck::IndexerVisitor
 public:
   IndexerVisitor(ASTContext &Ctx) { TraverseAST(Ctx); }
 
-  const std::unordered_set<const CallExpr *> &
+  const llvm::SmallPtrSetImpl<const CallExpr *> &
   getFnCalls(const FunctionDecl *Fn) {
     return Index[Fn->getCanonicalDecl()].Calls;
   }
 
-  const std::unordered_set<const DeclRefExpr *> &
+  const llvm::SmallPtrSetImpl<const DeclRefExpr *> &
----------------
carlosgalvezp wrote:

Thanks, I read now through the guidelines and indeed this is preferable :)

https://github.com/llvm/llvm-project/pull/174357


More information about the cfe-commits mailing list