[PATCH] D105014: added some example code for llvm::Expected

2021-09-22 Thread Christian Kühnel via Phabricator via cfe-commits
kuhnel added a comment. > Out of interest, did you see > https://llvm.org/docs/ProgrammersManual.html#error-handling ? If not (and if > you find it helpful) then maybe we need to make that document more > discoverable. If that document is not helpful then we should improve it. No I wasn't

[PATCH] D105014: added some example code for llvm::Expected

2021-09-04 Thread Lang Hames via Phabricator via cfe-commits
lhames added a comment. I missed this thread earlier -- thanks to Dave for pointing me to it. @kuhnel -- Thanks very much for working on this. Out of interest, did you see https://llvm.org/docs/ProgrammersManual.html#error-handling ? If not (and if you find it helpful) then maybe we need to

[PATCH] D105014: added some example code for llvm::Expected

2021-07-13 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added a comment. In D105014#2873739 , @sammccall wrote: > In D105014#2872674 , @dblaikie > wrote: > >> +@lhames for context as the author/owner of `llvm::Error` and associated >> things. >> >> Perhaps

[PATCH] D105014: added some example code for llvm::Expected

2021-07-13 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. In D105014#2872674 , @dblaikie wrote: > +@lhames for context as the author/owner of `llvm::Error` and associated > things. > > Perhaps it'd be handy to have some descriptions of the problems you > encountered, @kuhnel, and

[PATCH] D105014: added some example code for llvm::Expected

2021-07-12 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added subscribers: lhames, dblaikie. dblaikie added a comment. +@lhames for context as the author/owner of `llvm::Error` and associated things. Perhaps it'd be handy to have some descriptions of the problems you encountered, @kuhnel, and how you went about trying to resolve them, to

[PATCH] D105014: added some example code for llvm::Expected

2021-07-01 Thread Christian Kühnel via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGcd8f979fe48c: added some example code for llvm::ExpectedT (authored by kuhnel). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D105014/new/

[PATCH] D105014: added some example code for llvm::Expected

2021-06-30 Thread Christian Kühnel via Phabricator via cfe-commits
kuhnel updated this revision to Diff 355510. kuhnel added a comment. now fixing arc's way of git commits :( Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D105014/new/ https://reviews.llvm.org/D105014 Files: llvm/include/llvm/Support/Error.h

[PATCH] D105014: added some example code for llvm::Expected

2021-06-30 Thread Christian Kühnel via Phabricator via cfe-commits
kuhnel updated this revision to Diff 355508. kuhnel added a comment. fixed typo Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D105014/new/ https://reviews.llvm.org/D105014 Files: llvm/include/llvm/Testing/Support/Error.h Index:

[PATCH] D105014: added some example code for llvm::Expected

2021-06-30 Thread Christian Kühnel via Phabricator via cfe-commits
kuhnel updated this revision to Diff 355507. kuhnel marked 4 inline comments as done. kuhnel added a comment. updated code examples based on Sam's review Oh my, this is really simple if you know how it's supposed to work. However my intuition is completely off in trying to understand the error

[PATCH] D105014: added some example code for llvm::Expected

2021-06-30 Thread Sam McCall via Phabricator via cfe-commits
sammccall added inline comments. Comment at: llvm/include/llvm/Testing/Support/Error.h:168 +/// Helper marcro for checking the result of an 'Expected' +/// marcro -> macro Comment at: llvm/include/llvm/Testing/Support/Error.h:179 +///

[PATCH] D105014: added some example code for llvm::Expected

2021-06-30 Thread Christian Kühnel via Phabricator via cfe-commits
kuhnel added inline comments. Comment at: llvm/include/llvm/Support/Error.h:464 +///errs() << "Problem with division " +/// << toString(E) << "\n"; +/// } sammccall wrote: > this won't compile, you need std::move(E) sorry, I was too

[PATCH] D105014: added some example code for llvm::Expected

2021-06-30 Thread Christian Kühnel via Phabricator via cfe-commits
kuhnel updated this revision to Diff 355485. kuhnel marked 2 inline comments as done. kuhnel added a comment. fixed compilation issues Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D105014/new/ https://reviews.llvm.org/D105014 Files:

[PATCH] D105014: added some example code for llvm::Expected

2021-06-30 Thread Christian Kühnel via Phabricator via cfe-commits
kuhnel updated this revision to Diff 355481. kuhnel added a comment. also added example code for EXPECT_THAT_EXPECTED. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D105014/new/ https://reviews.llvm.org/D105014 Files:

[PATCH] D105014: added some example code for llvm::Expected

2021-06-30 Thread Sam McCall via Phabricator via cfe-commits
sammccall accepted this revision. sammccall added a comment. This revision is now accepted and ready to land. Thanks! Comment at: llvm/include/llvm/Support/Error.h:464 +///errs() << "Problem with division " +/// << toString(E) << "\n"; +/// }

[PATCH] D105014: added some example code for llvm::Expected

2021-06-30 Thread Christian Kühnel via Phabricator via cfe-commits
kuhnel updated this revision to Diff 355472. kuhnel marked an inline comment as done. kuhnel added a comment. argh, again fixed autoformatter :( Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D105014/new/ https://reviews.llvm.org/D105014 Files:

[PATCH] D105014: added some example code for llvm::Expected

2021-06-30 Thread Christian Kühnel via Phabricator via cfe-commits
kuhnel marked 4 inline comments as done. kuhnel added inline comments. Comment at: llvm/include/llvm/Support/Error.h:462 +/// +/// Unit-testing a function returning an 'Expceted': +/// @code{.cpp} sammccall wrote: > This seems too intrusive/unusual to put

[PATCH] D105014: added some example code for llvm::Expected

2021-06-30 Thread Christian Kühnel via Phabricator via cfe-commits
kuhnel updated this revision to Diff 355471. kuhnel marked 2 inline comments as done. kuhnel added a comment. fixed variable name Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D105014/new/ https://reviews.llvm.org/D105014 Files:

[PATCH] D105014: added some example code for llvm::Expected

2021-06-30 Thread Christian Kühnel via Phabricator via cfe-commits
kuhnel updated this revision to Diff 355470. kuhnel added a comment. addressed Sam's review comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D105014/new/ https://reviews.llvm.org/D105014 Files: llvm/include/llvm/Support/Error.h Index:

[PATCH] D105014: added some example code for llvm::Expected

2021-06-28 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. Yes, please revert the unrelated formatting changes. I agree Error is confusing and better docs might help. (Not as much as removing the confusing part of the design, but I that seems hard at this point!) However I don't think the "hump" you experienced can be

[PATCH] D105014: added some example code for llvm::Expected

2021-06-28 Thread Christian Kühnel via Phabricator via cfe-commits
kuhnel updated this revision to Diff 354855. kuhnel added a comment. undo of auto formatting Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D105014/new/ https://reviews.llvm.org/D105014 Files: llvm/include/llvm/Support/Error.h Index:

[PATCH] D105014: added some example code for llvm::Expected

2021-06-28 Thread Christian Kühnel via Phabricator via cfe-commits
kuhnel added a comment. Argh, the auto formatter seems to have done some magic. I guess I should revert these? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D105014/new/ https://reviews.llvm.org/D105014

[PATCH] D105014: added some example code for llvm::Expected

2021-06-28 Thread Christian Kühnel via Phabricator via cfe-commits
kuhnel updated this revision to Diff 354849. kuhnel added a comment. removed stray file Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D105014/new/ https://reviews.llvm.org/D105014 Files: llvm/include/llvm/Support/Error.h Index:

[PATCH] D105014: added some example code for llvm::Expected

2021-06-28 Thread Christian Kühnel via Phabricator via cfe-commits
kuhnel created this revision. kuhnel added a reviewer: sammccall. Herald added subscribers: dexonsmith, usaxena95, kadircet, arphaman. kuhnel requested review of this revision. Herald added projects: LLVM, clang-tools-extra. Herald added subscribers: cfe-commits, llvm-commits. Since I had some