From 65763c57fa60568be9b8ee3efb3b42074f63f3c4 Mon Sep 17 00:00:00 2001 From: Owen Mansel-Chan Date: Tue, 22 Sep 2026 14:06:48 +0100 Subject: [PATCH 1/3] Un-deprecate `ParenExpr` --- go/ql/lib/semmle/go/Expr.qll | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/go/ql/lib/semmle/go/Expr.qll b/go/ql/lib/semmle/go/Expr.qll index 4b2a31cc8930..9e566157871d 100644 --- a/go/ql/lib/semmle/go/Expr.qll +++ b/go/ql/lib/semmle/go/Expr.qll @@ -544,11 +544,20 @@ class SliceLit extends ArrayOrSliceLit { } /** - * DEPRECATED: `ParenExpr` is no longer extracted. Parenthesized expressions are - * transparent in the AST; the child expression takes the place of the parenthesized - * expression directly. + * A parenthesized expression. + * + * Examples: + * + * ```go + * (x + y) + * ``` + * + * Note that `ParenExpr` is no longer extracted - the child expression takes + * the place of the parenthesized expression directly. This class only exists + * for compatibility with old databases, and will be deprecated and removed in + * future. */ -deprecated class ParenExpr extends @parenexpr, Expr { +class ParenExpr extends @parenexpr, Expr { /** Gets the expression between parentheses. */ Expr getExpr() { result = this.getChildExpr(0) } From ad7e58c0221d411db4a36221f26783468ce1915f Mon Sep 17 00:00:00 2001 From: Owen Mansel-Chan Date: Tue, 22 Sep 2026 14:09:00 +0100 Subject: [PATCH 2/3] Correct change note --- go/ql/lib/change-notes/2026-08-13-cfg.md | 3 --- 1 file changed, 3 deletions(-) diff --git a/go/ql/lib/change-notes/2026-08-13-cfg.md b/go/ql/lib/change-notes/2026-08-13-cfg.md index 4614ebca0744..aa0d5a8634a1 100644 --- a/go/ql/lib/change-notes/2026-08-13-cfg.md +++ b/go/ql/lib/change-notes/2026-08-13-cfg.md @@ -27,6 +27,3 @@ category: breaking - `EvalCompoundAssignRhsInstruction` now also represents increment and decrement operations, and it and `EvalImplicitInitInstruction` directly represent their associated writes. -* `ParenExpr` has been deprecated because parenthesized expressions are no - longer extracted as separate AST nodes. The child expression now directly - takes the place of the parenthesized expression. From a04a2efc96ef3b7bf742720fc6dc4666aec0897c Mon Sep 17 00:00:00 2001 From: Owen Mansel-Chan <62447351+owen-mc@users.noreply.github.com> Date: Tue, 22 Sep 2026 14:15:18 +0100 Subject: [PATCH 3/3] Correct comment typo in ParenExpr class Fix typo in comment regarding ParenExpr deprecation. Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --- go/ql/lib/semmle/go/Expr.qll | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/go/ql/lib/semmle/go/Expr.qll b/go/ql/lib/semmle/go/Expr.qll index 9e566157871d..81b71c670841 100644 --- a/go/ql/lib/semmle/go/Expr.qll +++ b/go/ql/lib/semmle/go/Expr.qll @@ -555,7 +555,7 @@ class SliceLit extends ArrayOrSliceLit { * Note that `ParenExpr` is no longer extracted - the child expression takes * the place of the parenthesized expression directly. This class only exists * for compatibility with old databases, and will be deprecated and removed in - * future. + * the future. */ class ParenExpr extends @parenexpr, Expr { /** Gets the expression between parentheses. */