Skip to content
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

C++: Fix types of struct/union templates and fix assumptions on proxy classes #18483

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

jketema
Copy link
Contributor

@jketema jketema commented Jan 13, 2025

Pull Request checklist

All query authors

Internal query authors only

  • Autofixes generated based on these changes are valid, only needed if this PR makes significant changes to .ql, .qll, or .qhelp files. See the documentation (internal access required).
  • Changes are validated at scale (internal access required).
  • Adding a new query? Consider also adding the query to autofix.

@github-actions github-actions bot added the C++ label Jan 13, 2025
@jketema jketema added the depends on internal PR This PR should only be merged in sync with an internal Semmle PR label Jan 13, 2025
@jketema jketema force-pushed the extractor-fixes branch 3 times, most recently from 522e5f7 to 9846322 Compare January 13, 2025 15:28

bindingset[kind]
int getKind(int kind) {
if kind in [10, 11, 12]
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rows with 10, 11, 12 should not have been generated for a long time. However, before this PR there's no upgrade script that replaces these numbers with something within the used range of numbers. This means we could not remove any references to 10, 11, and 12. By adding this to this upgrade script we can now remove those references.

@@ -771,12 +771,13 @@ decltypes(

/*
case @usertype.kind of
1 = @struct
| 0 = @unknown_usertype
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

0 was used in practice already, so this just makes its use explicit.

@jketema jketema marked this pull request as ready for review January 13, 2025 20:48
@jketema jketema requested a review from a team as a code owner January 13, 2025 20:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C++ depends on internal PR This PR should only be merged in sync with an internal Semmle PR documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant