-
Notifications
You must be signed in to change notification settings - Fork 2k
C++: Support alias templates #21860
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
C++: Support alias templates #21860
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
336bbc2
C++: Add support for alias templates
jketema b684797
C++: Add upgrade and downgrade scripts
jketema 9637158
C++: Add change note
jketema 305a63b
C++: Update dbscheme stats
jketema c2e2770
C++: Simplify type alias class naming
jketema 7636bf5
Potential fix for pull request finding
jketema d14b806
Update cpp/ql/lib/semmle/code/cpp/TypedefType.qll
jketema 5f65534
Update cpp/ql/lib/change-notes/2026-05-16-alias-template.md
jketema 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
2,561 changes: 2,561 additions & 0 deletions
2,561
cpp/downgrades/837c4e02326aee4582405d069263092e80a15d82/old.dbscheme
Large diffs are not rendered by default.
Oops, something went wrong.
2,545 changes: 2,545 additions & 0 deletions
2,545
cpp/downgrades/837c4e02326aee4582405d069263092e80a15d82/semmlecode.cpp.dbscheme
Large diffs are not rendered by default.
Oops, something went wrong.
6 changes: 6 additions & 0 deletions
6
cpp/downgrades/837c4e02326aee4582405d069263092e80a15d82/upgrade.properties
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 |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| description: Support alias templates | ||
| compatibility: full | ||
| is_alias_template.rel: delete | ||
| alias_instantiation.rel: delete | ||
| alias_template_argument.rel: delete | ||
| alias_template_argument_value.rel: delete |
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 |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| --- | ||
| category: feature | ||
| --- | ||
| * Added `AliasTemplateType` and `AliasTemplateInstantiationType` classes, representing C++ alias templates and their instantiations. |
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 |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| --- | ||
| category: deprecated | ||
| --- | ||
| * The `UsingAliasTypedefType` class has been deprecated. Use `TypeAliasType` instead. |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -960,6 +960,22 @@ variable_template_argument_value( | |
| int arg_value: @expr ref | ||
| ); | ||
|
|
||
| is_alias_template(unique int id: @usertype ref); | ||
| alias_instantiation( | ||
| unique int to: @usertype ref, | ||
| int from: @usertype ref | ||
| ); | ||
| alias_template_argument( | ||
| int variable_id: @usertype ref, | ||
| int index: int ref, | ||
| int arg_type: @type ref | ||
| ); | ||
| alias_template_argument_value( | ||
| int variable_id: @usertype ref, | ||
|
Comment on lines
+969
to
+974
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The name is not really relevant. I've another scheme update in the pipeline. I'll fix this as part of that update. |
||
| int index: int ref, | ||
| int arg_value: @expr ref | ||
| ); | ||
|
|
||
| template_template_instantiation( | ||
| int to: @usertype ref, | ||
| int from: @usertype ref | ||
|
|
||
Oops, something went wrong.
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.