Skip to content

Conversation

@MathiasVP
Copy link
Contributor

All the ATL models I added in #18136 and #18261 were missing the ATL namespace. So they didn't actually work 😅

On a random Microsoft DB I had locally this go from recognizing 0 ATL-related functions to recognizing 2744 ATL-related functions 🎉

Copilot AI review requested due to automatic review settings March 14, 2025 18:48
@MathiasVP MathiasVP requested a review from a team as a code owner March 14, 2025 18:48
@github-actions github-actions bot added the C++ label Mar 14, 2025
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 missing ATL namespace entries in several C++ model YAML files. The changes add duplicate entries for ATL-specific models to enable recognition of ATL-related functions.

  • Added ATL namespace rows corresponding to existing empty namespace entries.
  • Updated all affected model files (e.g., CSimpleArray.model.yml, CPathT.model.yml, etc.) with similar ATL-specific entries.
  • No modifications to the original entries; new rows were appended using "ATL" as the namespace.

Reviewed Changes

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

Show a summary per file
File Description
cpp/ql/lib/ext/CSimpleArray.model.yml Added ATL version of CSimpleArray model entries.
cpp/ql/lib/ext/CPathT.model.yml Added ATL version of CPathT model entries.
cpp/ql/lib/ext/CAtlArray.model.yml Added ATL version of CAtlArray model entries.
cpp/ql/lib/ext/CSimpleMap.model.yml Added ATL version of CSimpleMap model entries.
cpp/ql/lib/ext/CStrBufT.model.yml Added ATL version of CStrBufT model entries.
cpp/ql/lib/ext/CStringData.model.yml Added ATL version of CStringData model entry.
cpp/ql/lib/ext/CAtlFile.model.yml Added ATL version of CAtlFile model entries.
cpp/ql/lib/ext/CAtlTemporaryFile.model.yml Added ATL version of CAtlTemporaryFile model entries.
cpp/ql/lib/ext/CAtlFileMappingBase.model.yml Added ATL version of CAtlFileMappingBase model entries.
cpp/ql/lib/ext/CRegKey.model.yml Added ATL version of CRegKey model entries.
cpp/ql/lib/ext/CAtlList.model.yml Added ATL version of CAtlList model entries.
cpp/ql/lib/ext/CUrl.model.yml Added ATL version of CUrl model entries.
cpp/ql/lib/ext/CComBSTR.model.yml Added ATL version of CComBSTR model entries.
cpp/ql/lib/ext/CSimpleStringT.model.yml Added ATL version of CSimpleStringT model entries.
cpp/ql/lib/ext/CA2CAEX.model.yml Added ATL version of CA2CAEX (and related) model entries.
cpp/ql/lib/ext/CComSafeArray.model.yml Added ATL version of CComSafeArray model entries.
cpp/ql/lib/ext/CStringT.model.yml Added ATL version of CStringT model entries.
Files not reviewed (3)
  • cpp/ql/lib/semmle/code/cpp/models/implementations/CA2AEX.qll: Language not supported
  • cpp/ql/lib/semmle/code/cpp/models/implementations/CAtlFile.qll: Language not supported
  • cpp/ql/lib/semmle/code/cpp/models/implementations/CAtlFileMapping.qll: Language not supported

Tip: Copilot only keeps its highest confidence comments to reduce noise and keep you focused. Learn more

@jketema
Copy link
Contributor

jketema commented Mar 14, 2025

There seems to be a CI test failure.

@MathiasVP
Copy link
Contributor Author

Oops. Thanks! I had forgotten to update a few tests

Copy link
Contributor

@jketema jketema 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 43a03de into github:main Mar 17, 2025
14 checks passed
@geoffw0
Copy link
Contributor

geoffw0 commented Mar 17, 2025

I think we should all try to pay more attention to namespaces on test case stubs in future. If any of the reviewers of either PR had noticed the lack of them and asked for them, it would have highlighted the problem in the models.

Thanks for noticing and fixing this in the end!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants