C++: Add dataflow predicate for checking if a node is the final value of a parameter#20017
Merged
jketema merged 3 commits intogithub:mainfrom Jul 10, 2025
Merged
C++: Add dataflow predicate for checking if a node is the final value of a parameter#20017jketema merged 3 commits intogithub:mainfrom
jketema merged 3 commits intogithub:mainfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This pull request adds a new dataflow predicate isFinalValueOfParameter to the C++ CodeQL library that checks if a dataflow node represents the final value of an output parameter before a function ends. The change provides a cleaner public API for accessing final parameter values without requiring direct use of internal classes.
- Adds two overloaded
isFinalValueOfParameterpredicates to theDataFlow::Nodeclass - Updates test code to use the new predicate instead of internal
FinalParameterNodeclass - Includes documentation fix for comment accuracy
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowUtil.qll | Adds new public predicates and fixes comment terminology |
| cpp/ql/test/library-tests/dataflow/dataflow-tests/has-parameter-flow-out.ql | Updates test to use new predicate API instead of internal classes |
| cpp/ql/lib/change-notes/2025-07-10-final.md | Documents the new feature addition |
cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowUtil.qll
Outdated
Show resolved
Hide resolved
cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowUtil.qll
Outdated
Show resolved
Hide resolved
Contributor
Author
|
DCA was uneventful. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.