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
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/
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
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
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
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
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:
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/
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);
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 =
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:
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
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
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
14 matches
Mail list logo