[PATCH] Add FilteredArgList to represent filtered arglist

David Blaikie dblaikie at gmail.com
Mon May 27 07:35:07 PDT 2013


On May 26, 2013 12:37 PM, "Rui Ueyama" <ruiu at google.com> wrote:
>
>
>> > +/// FilteredArgList - ArgList with filters. Useful to be used in
>> > +/// range-based for loop to iterate over filtered arguments.
>>
>> Could we just have/use a generic range abstraction (essentially a simple
class template with two iterator members, one returned by begin, the other
by end) rather than writing a custom type here?
>
> What if begin is called twice? Is it okay to return the same object, not
a new one?

If this is any kind of common iterator it must have the usual/obvious copy
semantics (that's an iterator requirement) - essentially copying the result
of begin should be as good as calling begin twice or there's something very
strange/surprising going on (which isn't unheard of in llvm's iterators -
so feel free to correct/tell me these are weird iterators that require a
special case - I've not looked at them enough to know either way yet)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130527/2923d8a4/attachment.html>


More information about the llvm-commits mailing list