[PATCH] D119792: [Clang] [P2025] Analyze only potential scopes for NRVO
Arthur O'Dwyer via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Feb 15 12:51:48 PST 2022
Quuxplusone added a reviewer: mizvekov.
Quuxplusone added a comment.
The code is above my pay grade, but FWIW, I super support the intent of this patch! Let's get p2025 support into Clang! :)
> The collection of common cases contains 20 examples: ยง4.1. Examples. Here is the current status of these examples:
>
> [OK] 13 out of 20 examples are working in Clang as expected.
> [FAIL] 13th example: should be considered separately (as part of fixing consteval code)
> [FAIL] 14th example: should be considered separately (as I haven't looked yet how CXXCatchStmt works).
> [FAIL] 18th example: is unfixable now because of Clang's architecture: my comment on the issue.
> [OK with the patch] 7th, 8th, 11th, 15th example: are working with this patch.
I think it would be an extremely good idea to commit all 20 of these test cases to clang/test/CodeGenCXX/, with their current behavior, as a preliminary patch. Then, D119792 <https://reviews.llvm.org/D119792> can more clearly show (1) what behavior it's changing, (2) what behavior it's keeping the same, and (3) the fact that it's not regressing any behavior. Also, you'll help future-maintainers by giving them some extra test cases that have already been identified as interesting, even if you personally aren't changing behavior related to those particular test cases.
(I recently took the same tactic with D119772 <https://reviews.llvm.org/D119772> as a preliminary for D119184 <https://reviews.llvm.org/D119184> + D119778 <https://reviews.llvm.org/D119778>, and it was very helpful, at least to me. :))
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D119792/new/
https://reviews.llvm.org/D119792
More information about the cfe-commits
mailing list