C++: add predicate to distinguish designator-based initializations#19313
Closed
C++: add predicate to distinguish designator-based initializations#19313
Conversation
f1bba2b to
ca40f29
Compare
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR introduces a new change note regarding designator-based initializations by adding predicates to distinguish between designator-based and positional initializations for both struct/union fields and array elements.
- Introduces the isDesignatorInit() predicate
- Adds a change note documenting the new predicate functionality
Files not reviewed (8)
- cpp/downgrades/159dbb330468991283454b1ac73b7f8411e97595/aggregate_array_init.ql: Language not supported
- cpp/downgrades/159dbb330468991283454b1ac73b7f8411e97595/aggregate_field_init.ql: Language not supported
- cpp/downgrades/159dbb330468991283454b1ac73b7f8411e97595/upgrade.properties: Language not supported
- cpp/ql/lib/semmle/code/cpp/exprs/Literal.qll: Language not supported
- cpp/ql/lib/semmlecode.cpp.dbscheme: Language not supported
- cpp/ql/lib/upgrades/e594389175c098d7225683d0fd8cefcc47d84bc1/aggregate_array_init.ql: Language not supported
- cpp/ql/lib/upgrades/e594389175c098d7225683d0fd8cefcc47d84bc1/aggregate_field_init.ql: Language not supported
- cpp/ql/lib/upgrades/e594389175c098d7225683d0fd8cefcc47d84bc1/upgrade.properties: Language not supported
| --- | ||
| category: feature | ||
| --- | ||
| * Introduced `isDesignatorInit()` predicates to distinguish between designator-based and positional initializations for both struct\union fields and array elements. No newline at end of file |
There was a problem hiding this comment.
The use of the backslash in 'struct\union' may lead to unintended markdown formatting. Consider using 'struct/union' or another clear separator to improve readability.
Suggested change
| * Introduced `isDesignatorInit()` predicates to distinguish between designator-based and positional initializations for both struct\union fields and array elements. | |
| * Introduced `isDesignatorInit()` predicates to distinguish between designator-based and positional initializations for both struct/union fields and array elements. |
098f2b4 to
67a6eb6
Compare
67a6eb6 to
45d1645
Compare
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.
Introduced
isDesignatorInit()predicates to distinguish between designator-based and positional initializations for both struct\union fields and array elements.