From d3b51dd3a31540ffcdc9be50fc9ef198a1da04bc Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 23 Jul 2026 10:09:02 +0000 Subject: [PATCH] C++: Remove Ruby-style (?#...) comment groups --- .../lib/semmle/code/cpp/regex/internal/ParseRegExp.qll | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/cpp/ql/lib/semmle/code/cpp/regex/internal/ParseRegExp.qll b/cpp/ql/lib/semmle/code/cpp/regex/internal/ParseRegExp.qll index c30649a2897..430fb88ee48 100644 --- a/cpp/ql/lib/semmle/code/cpp/regex/internal/ParseRegExp.qll +++ b/cpp/ql/lib/semmle/code/cpp/regex/internal/ParseRegExp.qll @@ -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