This is an archive of the discontinued LLVM Phabricator instance.

[libc++][NFC] Don't rely on `<algorithm>` transitively including `<memory>` in tests
ClosedPublic

Authored by fsb4000 on Aug 2 2022, 10:11 AM.

Diff Detail

Event Timeline

fsb4000 created this revision.Aug 2 2022, 10:11 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 2 2022, 10:11 AM
fsb4000 requested review of this revision.Aug 2 2022, 10:11 AM
Herald added a reviewer: Restricted Project. · View Herald TranscriptAug 2 2022, 10:11 AM
Mordante accepted this revision.Aug 2 2022, 10:20 AM
Mordante added a subscriber: Mordante.

Thanks, LGTM!

This revision is now accepted and ready to land.Aug 2 2022, 10:20 AM
var-const requested changes to this revision.Aug 2 2022, 10:33 AM
var-const added a subscriber: var-const.

@fsb4000 Thank you for the patch! Would you mind to update the description to something like the following?

[libc++][NFC] Don't rely on `<algorithm>` transitively including `<memory>` in tests

(The current description identifies the problem; I think it would be clearer to describe the fix instead)

libcxx/test/std/algorithms/ranges_result_alias_declarations.compile.pass.cpp
17

In libc++, <algorithm> transitively includes <memory>, which must be why we never noticed.

This revision now requires changes to proceed.Aug 2 2022, 10:33 AM
fsb4000 retitled this revision from [libc++] `uninitialized_copy_result`, `uninitialized_copy_n_result`, `uninitialized_move_n_result` defined in `<memory>` to [libc++][NFC] Don't rely on `<algorithm>` transitively including `<memory>` in tests.Aug 2 2022, 10:36 AM

Would you mind to update the description to something like the following?

Sure.
Done.

var-const accepted this revision.Aug 2 2022, 10:38 AM

LGTM, thanks!

This revision is now accepted and ready to land.Aug 2 2022, 10:38 AM