[PATCH] D57618: [ADT] Add a fallible_iterator wrapper.
Lang Hames via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Feb 4 14:49:52 PST 2019
lhames marked an inline comment as done.
lhames added inline comments.
================
Comment at: unittests/ADT/FallibleIteratorTest.cpp:194
+ ++I;
+ (void)!!Err; // Manualy reset the checked flag.
+ ++I;
----------------
lhames wrote:
> dblaikie wrote:
> > Might be better as an explicit EXPECT_THAT_ERROR(Succeeded) - if there was a bug that caused this Error to be in a fail state, the test would fail rather indirectly later on inside the fallible iterator implementationg where it does "cantFail' (or the moral equivalent)?
> Yep. This is another instance of moved-from-Errors-aren't-assignable/reusable. I could use two errors though.
Nope, wait: This is returning via the error reference. It has to be a check, until/unless I define moved-from Errors to be checked Error success values. Thinking about it though, that should be the case, so I can just document that in Error's move constructor.
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