Thanks to visit codestin.com
Credit goes to github.com

Skip to content

C++: Handle explicitly instantiated templates #16075

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 1 commit into from
Jun 25, 2025
Merged

Conversation

jketema
Copy link
Contributor

@jketema jketema commented Mar 27, 2024

Test updates after extractor changes

@github-actions github-actions bot added the C++ label Mar 27, 2024
@jketema jketema added the depends on internal PR This PR should only be merged in sync with an internal Semmle PR label Jun 17, 2025
@jketema jketema changed the title C++: Handle explicitly instantiated function and variable templates C++: Handle explicitly instantiated templates Jun 17, 2025
@jketema jketema marked this pull request as ready for review June 24, 2025 12:06
@Copilot Copilot AI review requested due to automatic review settings June 24, 2025 12:06
@jketema jketema requested a review from a team as a code owner June 24, 2025 12:06
Copy link
Contributor

@Copilot 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 updates expected test outputs to account for explicitly instantiated templates introduced by recent extractor changes.

  • Added duplicate “I” (instantiated) entries alongside “T” (template) entries across multiple test expectations.
  • Inserted new function and class template instantiation tests for load, foo, and switch-case scenarios.
  • Updated instantiation directive tests to include foo<float> and foo<int>.

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
cpp/ql/test/library-tests/templates/switch/test.expected Added duplicated switch-case entry for explicit instantiation
cpp/ql/test/library-tests/templates/isfromtemplateinstantiation/isfromuninstantiatedtemplate.expected Added “I” entries for definitions, statements, and expressions
cpp/ql/test/library-tests/templates/isfromtemplateinstantiation/isfromtemplateinstantiation.expected Added explicit instantiation entries for member function f
cpp/ql/test/library-tests/templates/isfromtemplateinstantiation/instantiations.expected Added a load<short> FunctionTemplateInstantiation entry
cpp/ql/test/library-tests/templates/instantiation_directive/functions.expected Added foo instantiations for float and int

@jketema jketema force-pushed the explicit branch 2 times, most recently from 8ed10d1 to fac63cb Compare June 24, 2025 17:53
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

@jketema jketema merged commit ddae471 into github:main Jun 25, 2025
8 of 9 checks passed
@jketema jketema deleted the explicit branch June 25, 2025 06:53
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants