mirror of
https://github.com/github/codeql.git
synced 2026-07-30 23:13:01 +02:00
C++: Remove Ruby-style (?#...) comment groups
This commit is contained in:
committed by
GitHub
parent
1a0b4cd646
commit
d3b51dd3a3
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user