-
Notifications
You must be signed in to change notification settings - Fork 15.5k
[Clang] Add a builtin that deduplicate types into a pack #106730
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
Merged
Merged
Changes from all commits
Commits
Show all changes
46 commits
Select commit
Hold shift + click to select a range
2762d75
[Clang] Add a builtins that deduplicate types into a pack
ilya-biryukov 241cbf4
Use wider int type to avoid truncating builting
ilya-biryukov 01e5a36
remove includes added by Clangd
ilya-biryukov f05e54d
Pass the builtin name in the error message
ilya-biryukov 0ebda66
Rename err_unsupported_builtin_template_pack_position to _expansion
ilya-biryukov 7b1d3fb
Use isa<> with multiple template arguments
ilya-biryukov 1f2f3d2
Remove unnecessary braces
ilya-biryukov ae0898b
Move helper into BuiltinTemplateDecl
ilya-biryukov 6288f96
Update mangled name
ilya-biryukov 1957947
Simplify an assertion
ilya-biryukov 11b2e84
Remove redundant llvm:: prefix
ilya-biryukov 0b5b579
Move check for the presence of template argument from parser into sema
ilya-biryukov 00971e3
Add a comment with parameter name
ilya-biryukov 61c57af
use if instead of continue
ilya-biryukov 989fdfb
Revert added #includes
ilya-biryukov df0b041
Remove braces
ilya-biryukov 1597f4a
Updated comments to use context instead of position
ilya-biryukov e409d0a
Remove redundant braces
ilya-biryukov bf72abe
remove redundant includes
ilya-biryukov 7f0700c
Added a FIXME about reducing code duplication
ilya-biryukov d2bfa3e
Add a comment from the duplicated version
ilya-biryukov 8ef79e9
Remove #includes
ilya-biryukov b81d054
Return Diag()
ilya-biryukov b01e1bb
Add comment, removed #includes
ilya-biryukov bdf79de
Fix a typo, add a comment
ilya-biryukov 925e81e
Add Template.h, it is needed
ilya-biryukov 028a222
Added requested tests
ilya-biryukov 937027f
Remove more unused #includes
ilya-biryukov 047847a
Fix test crashes
ilya-biryukov 82351ee
Revert unintentional change
ilya-biryukov 9fa61e1
Add a comment about SUBSTBUILTINPACK
ilya-biryukov 43b557f
rename Dep to Dependence
ilya-biryukov 62e8f95
Add a clarifying comment and a fixme for sugar
ilya-biryukov 2c0dd40
Merge remote-tracking branch 'origin/main' into dedup
ilya-biryukov e047cc4
Fix compilation after merge
ilya-biryukov 4496902
Format the code
ilya-biryukov 1cf22a2
Add a release note
ilya-biryukov eae6f58
Add documentation about the new builtin to LanguageExtensions.rst
ilya-biryukov da7ad41
replace loop with all_of
ilya-biryukov cc97b95
Remove unnecessary spaces
ilya-biryukov 53248dd
Merge remote-tracking branch 'origin/main' into dedup
ilya-biryukov 1c0beeb
add newline to fix documentation build errors
ilya-biryukov 5457414
Remove unnecessary check for TemplateName::DeducedTemplate
ilya-biryukov e0b40c7
Merge remote-tracking branch 'origin/main' into dedup
ilya-biryukov 869f9a9
Use `getAsTemplateDecl()`
ilya-biryukov deedc41
Merge remote-tracking branch 'origin/main' into dedup
ilya-biryukov 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
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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Who owns these arguments? Are they part of the containing declaration? How do we know which set are ours?
It IS a touch confusing we're using the type-bits instead of an arrayref here, but justified :( (Nothing to do with this sentence, just lamenting...).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think so, at least it's the case for SubstTemplateTypeParmPackType.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right, the contract is the same as
SubstTemplateTypeParmPackTypehere.It might be worth improving for both, I just tried to avoid scope creep in this review, though.