[PATCH] D28093: [ADT] Add a generic concatenating iterator and range.
Eric Fiselier via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Dec 24 19:22:16 PST 2016
EricWF requested changes to this revision.
EricWF added a reviewer: EricWF.
EricWF added inline comments.
This revision now requires changes to proceed.
================
Comment at: include/llvm/ADT/STLExtras.h:477
+ // Build a sequence of functions to increment each iterator if possible.
+ auto IncrementHelperFns = {&concat_iterator::incrementHelper<Ns>...};
+
----------------
EricWF wrote:
> If I'm not mistaken this deduces to `std::initializer_list<FuncType>`, and we shouldn't use `initializer_list` outside of performing initialization.
>
> This should be changed to deduce as an array type instead (or any other sequenced container).
After double checking the standard I'm confident to say this code has UB; and should be fixed before committing.
https://reviews.llvm.org/D28093
More information about the llvm-commits
mailing list