C++: Fix C++20 concept related class extensions#20026
Merged
jketema merged 1 commit intogithub:mainfrom Jul 13, 2025
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR fixes C++20 concept-related class extensions in the CodeQL library by correcting the inheritance hierarchy for requirement expressions. The changes ensure that all requirement expression classes properly inherit from RequirementExpr and eliminate redundant parent checks.
Key changes:
- Adds constructor logic to
RequirementExprto establish proper parent-child relationships - Refactors requirement expression classes to use the base class constructor instead of duplicating parent checks
- Corrects the inheritance hierarchy for
NestedRequirementExprandConceptIdExpr
IdrissRio
approved these changes
Jul 12, 2025
Contributor
IdrissRio
left a comment
There was a problem hiding this comment.
DCA is happy and LGTM 👍
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.
Noted by @MathiasVP on Slack.
RequirementExprwas missing a charpred, or wasn't abstract. I added a charpred.NestedRequirementExpraccidentally didn't extendRequirementExprConceptIdExpraccidentally did extendRequirementExpr(while it can occur in other contexts)