[PATCH] D119184: [clang] [concepts] Check constrained-auto return types for void-returning functions

2022-03-04 Thread Arthur O'Dwyer via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGf0891cd61b2f: [clang] [concepts] Check constrained-auto return types for void-returning… (authored by arthur.j.odwyer). Changed prior to commit: https://reviews.llvm.org/D119184?vs=413006=413046#toc

[PATCH] D119184: [clang] [concepts] Check constrained-auto return types for void-returning functions

2022-03-04 Thread Arthur O'Dwyer via Phabricator via cfe-commits
Quuxplusone updated this revision to Diff 413006. Quuxplusone added a comment. Herald added a project: All. Rebased, poke CI one last time. If this is green, imma land it. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D119184/new/

[PATCH] D119184: [clang] [concepts] Check constrained-auto return types for void-returning functions

2022-02-17 Thread Arthur O'Dwyer via Phabricator via cfe-commits
Quuxplusone updated this revision to Diff 409740. Quuxplusone added a comment. Rebase and update — this is becoming more and more of a trivial patch, which I guess is good! Add a test case for https://github.com/llvm/llvm-project/issues/53911 (which I finally thought to test, and was surprised

[PATCH] D119184: [clang] [concepts] Check constrained-auto return types for void-returning functions

2022-02-17 Thread Arthur O'Dwyer via Phabricator via cfe-commits
Quuxplusone added inline comments. Comment at: clang/test/SemaCXX/deduced-return-type-cxx14.cpp:116 -auto _ret_2() {} // expected-error {{cannot deduce return type 'auto &' for function with no return statements}} +auto _ret_2() {} // expected-error {{cannot form a reference

[PATCH] D119184: [clang] [concepts] Check constrained-auto return types for void-returning functions

2022-02-17 Thread Arthur O'Dwyer via Phabricator via cfe-commits
Quuxplusone added inline comments. Comment at: clang/lib/Sema/SemaStmt.cpp:3766 +Expr *, const AutoType *AT, +bool HasReturnStmt) { + // If this is the conversion function for a lambda, we

[PATCH] D119184: [clang] [concepts] Check constrained-auto return types for void-returning functions

2022-02-16 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added inline comments. Comment at: clang/lib/Sema/SemaStmt.cpp:3766 +Expr *, const AutoType *AT, +bool HasReturnStmt) { + // If this is the conversion function for a lambda, we choose

[PATCH] D119184: [clang] [concepts] Check constrained-auto return types for void-returning functions

2022-02-15 Thread Arthur O'Dwyer via Phabricator via cfe-commits
Quuxplusone updated this revision to Diff 409090. Quuxplusone added a comment. Rebase; fix the clang-format nit; reinsert a missing `FD->setInvalidDecl()` that seemed to be causing crashes in Modules code under libcxx/test/ but otherwise doesn't seem to be tested in clang/test/ :( Repository:

[PATCH] D119184: [clang] [concepts] Check constrained-auto return types for void-returning functions

2022-02-14 Thread Arthur O'Dwyer via Phabricator via cfe-commits
Quuxplusone updated this revision to Diff 408594. Quuxplusone marked an inline comment as done and an inline comment as not done. Quuxplusone added a comment. Address review comments; add exhaustive tests as a parent revision. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D119184/new/

[PATCH] D119184: [clang] [concepts] Check constrained-auto return types for void-returning functions

2022-02-10 Thread Sam McCall via Phabricator via cfe-commits
sammccall added inline comments. Comment at: clang/lib/Sema/SemaStmt.cpp:3816 +Context.getTrivialTypeSourceInfo(Context.VoidTy, ReturnLoc), ReturnLoc); +Expr *Dummy = R.get(); +DeduceAutoResult DAR = DeduceAutoType(OrigResultType, Dummy, Deduced);

[PATCH] D119184: [clang] [concepts] Check constrained-auto return types for void-returning functions

2022-02-10 Thread Arthur O'Dwyer via Phabricator via cfe-commits
Quuxplusone marked an inline comment as not done. Quuxplusone added inline comments. Comment at: clang/lib/Sema/SemaStmt.cpp:3816 +Context.getTrivialTypeSourceInfo(Context.VoidTy, ReturnLoc), ReturnLoc); +Expr *Dummy = R.get(); +DeduceAutoResult DAR =

[PATCH] D119184: [clang] [concepts] Check constrained-auto return types for void-returning functions

2022-02-10 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. This looks right to me, though I think we should spend a few more lines to preserve the nice diagnostics for simple cases. Comment at:

[PATCH] D119184: [clang] [concepts] Check constrained-auto return types for void-returning functions

2022-02-09 Thread Arthur O'Dwyer via Phabricator via cfe-commits
Quuxplusone updated this revision to Diff 407284. Quuxplusone added a comment. Rebase; clang-format. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D119184/new/ https://reviews.llvm.org/D119184 Files: clang/include/clang/Sema/Sema.h

[PATCH] D119184: [clang] [concepts] Check constrained-auto return types for void-returning functions

2022-02-08 Thread Arthur O'Dwyer via Phabricator via cfe-commits
Quuxplusone updated this revision to Diff 406847. Quuxplusone added a comment. Update one additional test where the expected output has changed: auto& f() { } now produces "can't make a reference to void" instead of "can't deduce `auto&` from no return statements." I think this is a mild

[PATCH] D119184: [clang] [concepts] Check constrained-auto return types for void-returning functions

2022-02-07 Thread Arthur O'Dwyer via Phabricator via cfe-commits
Quuxplusone created this revision. Quuxplusone added reviewers: sammccall, saar.raz, rsmith, mizvekov, majnemer, riccibruno. Quuxplusone added a project: clang. Quuxplusone requested review of this revision. Herald added a subscriber: cfe-commits. Fixes