Details
- Reviewers
ldionne EricWF mclow.lists - Group Reviewers
Restricted Project
Diff Detail
- Repository
- rG LLVM Github Monorepo
- Build Status
Buildable 40866 Build 41004: arc lint + arc unit
Event Timeline
Woops, it also looks like you are missing the feature test macros:
Add to Table 17: Feature-test macros with the appropriate value:
__cpp_constexpr_dynamic_alloc
Add to Table 36: Standard library feature-test macros with the appropriate value:
__cpp_lib_constexpr_dynamic_alloc <memory>
I'm planning to add __cpp_lib_constexpr_dynamic_alloc in a later patch, after the rest of P0784.
libcxx/include/memory | ||
---|---|---|
1957 | This is because __cpp_constexpr_dynamic_alloc also controls whether you can call a destructor explicitly inside constexpr, right? It looks kind of funny, because we don't allocate here. EDIT: I guess the same hold for construct, where we use placement-new. | |
libcxx/include/new | ||
261 | I assume you had to move the __do_call functions here because making them constexpr somehow required their definition to appear above the definition of the various __do_allocate functions below? | |
libcxx/test/std/utilities/memory/default.allocator/allocator.members/allocate.fail.cpp | ||
29 | I don't understand that test. Shouldn't allocator be made constexpr by this patch? Why do you check that there's an error saying it's not an ICE? | |
libcxx/test/std/utilities/memory/default.allocator/allocator.members/allocate.pass.cpp | ||
83 | You have a mismatch in the indentation of the return and body. | |
libcxx/test/std/utilities/memory/default.allocator/allocator.members/allocate.size.fail.cpp | ||
38 | I would expect that you get one error for each statement up in test() above. Isn't it what's happening? I would expect something like expected-error 4 {{...}}. | |
39 | Why not just static_assert here? |
libcxx/include/new | ||
---|---|---|
261 | That's correct. | |
libcxx/test/std/utilities/memory/default.allocator/allocator.members/allocate.pass.cpp | ||
83 | Yeah, I was following the formatting of many of tests. See libcxx/test/std/utilities/memory/default.allocator/allocator_types.pass.cpp for an example, but there are many others. |
libcxx/include/memory | ||
---|---|---|
1957 | Yep, that's also correct. |
This is superseded by https://reviews.llvm.org/D68364. Thanks a lot for your work on this @mpark, I based my patch on top of yours. I tried taking all the comments from this review and incorporating them into D68364.
Isn't it fine to throw inside constexpr if we can't allocate?