https://github.com/HerrCai0907 created https://github.com/llvm/llvm-project/pull/69851
None >From 37f6822035845f120d2fb995a607561621c3892e Mon Sep 17 00:00:00 2001 From: Congcong Cai <congcongcai0...@163.com> Date: Sun, 22 Oct 2023 00:27:04 +0800 Subject: [PATCH] [NFC] use `StringSet::insert(iter, iter)` instead for loop to insert elements --- clang/lib/ARCMigrate/ObjCMT.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/clang/lib/ARCMigrate/ObjCMT.cpp b/clang/lib/ARCMigrate/ObjCMT.cpp index 8458a72d6a2482b..4fa4ab8d42b7d3e 100644 --- a/clang/lib/ARCMigrate/ObjCMT.cpp +++ b/clang/lib/ARCMigrate/ObjCMT.cpp @@ -123,9 +123,7 @@ class ObjCMigrateASTConsumer : public ASTConsumer { NSIntegerTypedefed(nullptr), NSUIntegerTypedefed(nullptr), Remapper(remapper), FileMgr(fileMgr), PPRec(PPRec), PP(PP), IsOutputFile(isOutputFile), FoundationIncluded(false) { - // FIXME: StringSet should have insert(iter, iter) to use here. - for (const std::string &Val : AllowList) - AllowListFilenames.insert(Val); + AllowListFilenames.insert(AllowList.begin(), AllowList.end()); } protected: _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits