Skip to content

Conversation

@jketema
Copy link
Contributor

@jketema jketema commented Nov 8, 2025

No description provided.

@jketema jketema added the no-change-note-required This PR does not need a change note label Nov 8, 2025
@github-actions github-actions bot added the C++ label Nov 8, 2025
@jketema jketema added the depends on internal PR This PR should only be merged in sync with an internal Semmle PR label Nov 8, 2025
@jketema jketema marked this pull request as ready for review November 9, 2025 07:28
@jketema jketema requested a review from a team as a code owner November 9, 2025 07:28
Copilot AI review requested due to automatic review settings November 9, 2025 07:28
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes an issue with decltype in C++ code by allowing decltype to act as a name qualifier in addition to being a type. The change addresses a problem where decltype couldn't be used in qualified name contexts (e.g., decltype(expr)::member).

Key changes:

  • Updated the database schema to include @decltype in the @namequalifyingelement union
  • Made Decltype, TypeofType, and IntrinsicTransformedType classes extend NameQualifyingElement
  • Added getName() implementations that return descriptive strings like "decltype(...)" instead of none()
  • Updated test expectations to reflect new parameter type signatures containing decltype(...)

Reviewed Changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated no comments.

Show a summary per file
File Description
cpp/ql/lib/semmlecode.cpp.dbscheme Added @decltype to @namequalifyingelement union to allow decltype as a name qualifier
cpp/ql/lib/semmle/code/cpp/Type.qll Made Decltype extend NameQualifyingElement and added getName() implementation returning "decltype(...)"
cpp/ql/lib/semmle/code/cpp/Type.qll Updated TypeofType and IntrinsicTransformedType to return descriptive names instead of none()
cpp/ql/lib/semmle/code/cpp/NameQualifiers.qll Updated documentation to mention decltype as a valid name qualifying element
cpp/ql/test/library-tests/dataflow/taint-tests/test_mad-signatures.expected Updated test expectations with new decltype(...) parameter type entries
cpp/ql/lib/upgrades/c16b29b27f71247023321cc0d0360998b318837c/upgrade.properties Added upgrade metadata for the schema change
cpp/downgrades/2121ffec11fac265524955fee1775217364d4ca4/upgrade.properties Added downgrade metadata for schema compatibility

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Contributor

@IdrissRio IdrissRio left a comment

Choose a reason for hiding this comment

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

LGTM 👍
There’s a small typo in the first commit message. Please consider fixing it.

@jketema jketema merged commit eb3e864 into github:main Nov 10, 2025
15 of 16 checks passed
@jketema jketema deleted the qual-fail branch November 10, 2025 09:36
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 no-change-note-required This PR does not need a change note

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants