[PATCH] D22208: clang-tidy] Fixes to modernize-use-emplace

Aaron Ballman via cfe-commits cfe-commits at lists.llvm.org
Thu Jul 21 08:37:35 PDT 2016


aaron.ballman added inline comments.

================
Comment at: clang-tidy/modernize/UseEmplaceCheck.h:36-37
@@ -32,1 +35,4 @@
+private:
+  std::vector<std::string> ContainersWithPushBack;
+  std::vector<std::string> SmartPointers;
 };
----------------
Why not use a SmallVector for these instead of a std::vector? Then you don't need to typecast in registerMatchers().

If it's because of parseStringList(), I think that you can work around it's tight coupling using llvm::iterator_range(parseStringList()) to perform the initialization in the ctor initializer list.


Repository:
  rL LLVM

https://reviews.llvm.org/D22208





More information about the cfe-commits mailing list