[PATCH] D17778: TypedError for recoverable error handling

David Blaikie via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 15 17:13:42 PDT 2016

On Tue, Mar 15, 2016 at 5:02 PM, Lang Hames via llvm-commits <
llvm-commits at lists.llvm.org> wrote:

> lhames added a comment.
> > I think the ErrorHandlerTraits + test cases might be able to be
> simplified/reduced by implementing some more general and orthogonal
> constructs. If we had a trait for "arguments to a callable" (as is
> described here:
> http://stackoverflow.com/questions/21465394/accept-any-kind-of-callable-and-also-know-argument-type
> ) and then just used std::result_of, we could probably get away from this
> code having to worry about members V non-members, etc. Might be able to do
> the unique_ptr versus ref variants just with overloading & decltype to get
> the return type... it's a bit hand wavy, I realize, but happy to work
> through it in more detail if you like.
> I think factoring out the argument-matching stuff into a general
> callable_traits class would be useful, and I'm happy to do it, . I need to
> do something like that anyway for some improvements I want to make to the
> RPC API. That said, I think we can do that post commit - I want to take
> some time to think about the right way to do it, and I don't want to block
> the people who are waiting for this Error support to land.

Rightio - yeah, it'd just be nice to cleanup soonish & cleanup the large
combination of test cases once the implementation can be reduced in
complexity by having more orthogonality around parameter and result types,
etc. (once they're orthogonal in the implementation there's no need to test
every combination, etc)

Sounds good.

Otherwise this looks good to commit whenever you're ready - we can iterate
on the rest post commit.

- Dave

> http://reviews.llvm.org/D17778
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160315/7023106e/attachment.html>

More information about the llvm-commits mailing list