Apr 6 2021
In general LGTM, once you address the couple of points I raised, and address the relevant linter issues.
- test/SemaCXX/coroutine-rvo: Make MoveOnly trivial, since the temporary is not created anymore and there is no special reason to test a non-trivial type here.
- Finally addresses all of Arthur's review requests.
- Rebased on top of D99696.
- small Doxygen fix.
Apr 3 2021
- Addresses most of Arthur's points.
- Re-adds test coverage for conversion-function.cpp and temp.mem/p5.cpp with no C++ version specified.
- Adds a couple more tests on nrvo-tracking for blocks returning references.
Apr 2 2021
Just rebased, removing trailing whitespace noise.
@Quuxplusone Thank you for the review. All your points are good ones and will be addressed in time!
Fixes for auto&, decltype(auto).
Exclude candidates from functions with dependent / undeduced return types which are references.
Adjusts the CodeGen tests from D99225.
Includes some new NRVO tests which will be used in D99696.
Mar 31 2021
fix clang-tidy warning.
Wow, nice catches. For posterity, here's the missed-optimization being addressed IIUC: https://godbolt.org/z/MEoKGs7cE
Mar 30 2021
Mar 29 2021
Changes per rsmith review:
Small update making some invariants more clear, with some simplifications.
Mar 28 2021
some further simplifications
So it turns out there was a pre-existing bug where ObjC++ blocks
with dependent return type were not getting copy elision.
Mar 27 2021
Cleaned up implementation, not WIP anymore, ready for review.
Mar 24 2021
Rebased on top of D99225, running on a bunch of extra tests.
Mar 23 2021
Normalize test tag names on clang/test/SemaCXX/P1155.cpp
Splitting off the test changes into: https://reviews.llvm.org/D99225
Changes per Arthur.
Shrink the code by one line, by introducing another local named variable.
Still hoping for an "accept" here.
Mar 22 2021
Mar 21 2021
- Implemented co_return as per Aaron's suggestion.
- Imported coroutine tests from D68845.
- Test tags shortened: cxxYY_cxxZZ means every version from YY to ZZ, instead of cxxAA_BB_CC_DD.
- Existing test on decltype(auto) updated to also run on c++2b.
- Change one of the test cases to just instantiate the relevant template, as per Arthur.
With my previous comment I meant that it's better if you leave out the co_return bits for now because it's wrong anyway. We can't use PerformMoveOrCopyInitialization. It would just generate merge conflicts.
Conspicuously missing: tests for decltype(auto) return types, tests for co_return.
Though the first comment warns you that this is a work in progress and I just didn't get around to doing it yet ;)
Mar 20 2021
- Removed special flag, now is enabled on -std=c++2b
- Always enabled for coroutines
- Ran test suite
- Some relevant test files updated to also run c++2b
- Some new tests added
For coroutines I have D68845. The current code is wrong, and not trivial to fix. We have never properly implemented P1825 and will probably just go with P2266 unconditionally, because that two-phase lookup is very cumbersome to imlement.
Mar 19 2021
Mar 17 2021
Mar 15 2021
I don't know what is going on with the clang-format linux failure here.
The patch it suggests looks awful...
broken bot rebuild repush
Mar 13 2021
- Uses yet another simpler approach: Since dependence should not matter (we were using the type of the expression after template instantiation anyway), we don't even need to build a decltype type here, and just get the canonical type from the (expr) instead. Kudos to rsmith for this suggestion in private.
- Adds some more tests, testing more kinds of values.
Mar 12 2021
Mar 9 2021
Change to simpler way to do it:
For CompleteObject Kind, just fill in the declaration for the complete object.
Mar 8 2021
You are absolutely right, my bad!!
Now this a patch just about improving the diagnostic as rsmith suggested.
Addressed rsmith's concerns.
Fixed test type name to avoid picking up suggestions from other tests.
Addressing Arthur's concerns:
- Changed getBaseDecltypeForExpr to getDecltypeForParenthesizedExpr.
- Changed ImplicitParens to Parenthesized.
- Clarified comment.
Mar 7 2021
Repush, no changes.
Mar 5 2021
Turns out someone had already reported this bug.
Added new tests as suggested by rsmith.