-
Notifications
You must be signed in to change notification settings - Fork 1.9k
C++: Fix ATL models' namespace column #19030
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
Conversation
There was a problem hiding this 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
|
There seems to be a CI test failure. |
|
Oops. Thanks! I had forgotten to update a few tests |
jketema
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
|
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! |
All the ATL models I added in #18136 and #18261 were missing the
ATLnamespace. 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 🎉