[PATCH] D69959: [C-index] Fix test when using Debug target & MSVC STL

David Blaikie via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Nov 12 17:40:22 PST 2019


dblaikie added inline comments.


================
Comment at: clang-tools-extra/clang-move/tool/ClangMove.cpp:113
   move::MoveDefinitionSpec Spec;
-  Spec.Names = {Names.begin(), Names.end()};
+  Spec.Names = (std::vector<std::string> &)Names;
   Spec.OldHeader = OldHeader;
----------------
rnk wrote:
> Converting from std::list to SmallVector by way of std::vector with a C-style cast is a bit surprising. Is there a simpler way to write this, like `Spec.Names.assign(Names.begin(), Names.end());`?
Yep, +1 to assign(begin, end) & leaving SmallVector's API alone/not adding a converting assignment operator.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D69959/new/

https://reviews.llvm.org/D69959





More information about the cfe-commits mailing list