This is an archive of the discontinued LLVM Phabricator instance.

[libc++] Use ASSERT_SAME_TYPE instead of <type_traits> in depr tests
ClosedPublic

Authored by ldionne on Mar 1 2023, 1:46 PM.

Details

Reviewers
None
Group Reviewers
Restricted Project
Commits
rG9dfb142ce0bf: [libc++] Use ASSERT_SAME_TYPE instead of <type_traits> in depr tests
Summary

Whenever, possible, use ASSERT_SAME_TYPE instead of static_assert along
with std::is_same in the depr header tests. This prevents dragging in
multiple headers unrelated to the header being tested, which can (and
has) hidden issues.

Also, add a couple of tests to ensure that basic declarations in
<stddef.h> and <stdint.h> are available when including just those
headers, since the rest of the tests for those types require pulling
in additional dependencies.

Diff Detail

Event Timeline

ldionne created this revision.Mar 1 2023, 1:46 PM
Herald added a project: Restricted Project. · View Herald TranscriptMar 1 2023, 1:46 PM
ldionne requested review of this revision.Mar 1 2023, 1:46 PM
Herald added a project: Restricted Project. · View Herald TranscriptMar 1 2023, 1:46 PM
Herald added a reviewer: Restricted Project. · View Herald Transcript
This revision was not accepted when it landed; it landed in state Needs Review.Mar 2 2023, 9:37 AM
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
libcxx/test/std/depr/depr.c.headers/stdio_h.compile.pass.cpp