-
Notifications
You must be signed in to change notification settings - Fork 15.1k
[libcxx] improves diagnostics for containers with bad value types #106296
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
cjdb
wants to merge
32
commits into
llvm:main
Choose a base branch
from
cjdb:cleaner-libcxx-diagnostics
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 11 commits
Commits
Show all changes
32 commits
Select commit
Hold shift + click to select a range
5529499
[libcxx] improves diagnostics for containers with bad value types
cjdb 1e6b81b
rewords diagnostics per internal feedback and adds arrays
cjdb 6c1e1e3
formats files
cjdb 938299d
sorts includes missed by clang-format
cjdb 65346a3
more include sorting
cjdb 472ffcf
more formatting, with a successful git clang-format
cjdb 7596a2e
excludes <array> test from C++03
cjdb 25e999f
suppresses irrelevant diagnostic
cjdb 5a1b902
s/__is_unbounded_array(T)/__libcpp_is_unbounded_array<T>::value/g
cjdb 99a4509
applies Louis' request
cjdb 45c85d6
finally gets git-clang-format on side
cjdb dbf872a
unifies the containers' diagnostics
cjdb e596964
Update libcxx/include/__type_traits/diagnostic_utilities.h
cjdb e2d65c0
removes extraneous headers, adds macro to `std::allocator`
cjdb 0487281
applies clang-format
cjdb 6d9ce9e
changes using `is_array` to `is_bounded_array`
cjdb c49b7e8
reduces the number of trait instantiations
cjdb eb2fd68
removes commented out code
cjdb 55a2e7a
Merge branch 'main' into cleaner-libcxx-diagnostics
cjdb d9043c4
post-sync clang-format
cjdb ab41024
responds to red CI
cjdb 7bd03b3
responds to red CI
cjdb ef9d9c3
responds to red CI
cjdb f0f88d7
responds to red CI
cjdb bb82c95
replaces TODOs
cjdb 33a452d
Revert "replaces TODOs"
cjdb 6981a2a
Update libcxx/include/__type_traits/diagnostic_utilities.h
cjdb 9fe3f4a
Update libcxx/include/__type_traits/diagnostic_utilities.h
cjdb b97942e
separates the cv-unqualified object requirement for other diganostics
cjdb 02ffa16
fixes asan diagnostic
cjdb f75d1ae
Merge branch 'main' into cleaner-libcxx-diagnostics
cjdb 20e0996
Merge branch 'main' into cleaner-libcxx-diagnostics
cjdb File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -16,9 +16,12 @@ | |
| #include <__memory/allocator_traits.h> | ||
| #include <__type_traits/is_const.h> | ||
| #include <__type_traits/is_constant_evaluated.h> | ||
| #include <__type_traits/is_function.h> | ||
| #include <__type_traits/is_reference.h> | ||
| #include <__type_traits/is_same.h> | ||
| #include <__type_traits/is_void.h> | ||
| #include <__type_traits/is_volatile.h> | ||
| #include <__type_traits/remove_reference.h> | ||
| #include <__utility/forward.h> | ||
| #include <cstddef> | ||
| #include <new> | ||
|
|
@@ -76,8 +79,10 @@ struct __non_trivial_if<true, _Unique> { | |
|
|
||
| template <class _Tp> | ||
| class _LIBCPP_TEMPLATE_VIS allocator : private __non_trivial_if<!is_void<_Tp>::value, allocator<_Tp> > { | ||
| static_assert(!is_const<_Tp>::value, "std::allocator does not support const types"); | ||
| static_assert(!is_volatile<_Tp>::value, "std::allocator does not support volatile types"); | ||
| static_assert(!is_const<_Tp>::value, "'std::allocator' cannot allocate const types"); | ||
| static_assert(!is_volatile<_Tp>::value, "'std::allocator' cannot allocate volatile types"); | ||
| static_assert(!is_reference<_Tp>::value, "'std::allocator' cannot allocate references"); | ||
| static_assert(!is_function<_Tp>::value, "'std::allocator' cannot allocate functions"); | ||
|
||
|
|
||
| public: | ||
| typedef size_t size_type; | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.