C++: Remove Ruby-style (?#...) comment groups

This commit is contained in:
copilot-swe-agent[bot]
2026-07-23 10:09:02 +00:00
committed by GitHub
parent 1a0b4cd646
commit d3b51dd3a3

View File

@@ -596,8 +596,6 @@ abstract class RegExp extends StringLiteral {
or
this.negativeLookbehindAssertionStart(start, end)
or
this.commentGroupStart(start, end)
or
this.simpleGroupStart(start, end)
}
@@ -674,14 +672,6 @@ abstract class RegExp extends StringLiteral {
end = start + 4
}
/** Matches the start of a comment group, i.e. `(?#`. */
private predicate commentGroupStart(int start, int end) {
this.isGroupStart(start) and
this.getChar(start + 1) = "?" and
this.getChar(start + 2) = "#" and
end = start + 3
}
/** Matches the contents of a group. */
predicate groupContents(int start, int end, int inStart, int inEnd) {
this.groupStart(start, inStart) and