[clang] 65c9c92 - [NFC] use `StringSet::insert(iter, iter)` instead for loop to insert (#69851)

via cfe-commits cfe-commits at lists.llvm.org
Mon Oct 23 09:19:16 PDT 2023


Author: Congcong Cai
Date: 2023-10-24T00:19:12+08:00
New Revision: 65c9c9235075d6e4cd7d70d95a1aca6611e39744

URL: https://github.com/llvm/llvm-project/commit/65c9c9235075d6e4cd7d70d95a1aca6611e39744
DIFF: https://github.com/llvm/llvm-project/commit/65c9c9235075d6e4cd7d70d95a1aca6611e39744.diff

LOG: [NFC] use `StringSet::insert(iter, iter)` instead for loop to insert (#69851)

Added: 
    

Modified: 
    clang/lib/ARCMigrate/ObjCMT.cpp

Removed: 
    


################################################################################
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:


        


More information about the cfe-commits mailing list