[PATCH] D57618: [ADT] Add a fallible_iterator wrapper.
Lang Hames via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Feb 4 17:19:37 PST 2019
lhames marked an inline comment as done.
lhames added inline comments.
================
Comment at: unittests/ADT/FallibleIteratorTest.cpp:28
+ Object(ObjectValid V) : V(V) {}
+ bool isValid() const { return V == ValidObject; }
+
----------------
dblaikie wrote:
> Having another concept of validity here seems confusing, to me at least - if this needs an arbitrary member function to call to test -> on the iterator, perhaps it could have some other name - so it's not likely to confuse the validity/error checking that's central to this testing?
I was going to have the dereference operator for ArchiveWalker return an Expected<Object> based on this state in some future tests, but it’s probably enough to test that a move only value type can be propagated through the dereference operator. I will do that instead and rename the types as you suggested.
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D57618/new/
https://reviews.llvm.org/D57618
More information about the llvm-commits
mailing list