Skip to content

Commit 58f080e

Browse files
authored
Merge pull request #22650 from owen-mc/go/undeprecate-parenexpr
Go: un-deprecate `ParenExpr`
2 parents b0bbca9 + a04a2ef commit 58f080e

2 files changed

Lines changed: 13 additions & 7 deletions

File tree

‎go/ql/lib/change-notes/2026-08-13-cfg.md‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,3 @@ category: breaking
2727
- `EvalCompoundAssignRhsInstruction` now also represents increment and
2828
decrement operations, and it and `EvalImplicitInitInstruction` directly
2929
represent their associated writes.
30-
* `ParenExpr` has been deprecated because parenthesized expressions are no
31-
longer extracted as separate AST nodes. The child expression now directly
32-
takes the place of the parenthesized expression.

‎go/ql/lib/semmle/go/Expr.qll‎

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -544,11 +544,20 @@ class SliceLit extends ArrayOrSliceLit {
544544
}
545545

546546
/**
547-
* DEPRECATED: `ParenExpr` is no longer extracted. Parenthesized expressions are
548-
* transparent in the AST; the child expression takes the place of the parenthesized
549-
* expression directly.
547+
* A parenthesized expression.
548+
*
549+
* Examples:
550+
*
551+
* ```go
552+
* (x + y)
553+
* ```
554+
*
555+
* Note that `ParenExpr` is no longer extracted - the child expression takes
556+
* the place of the parenthesized expression directly. This class only exists
557+
* for compatibility with old databases, and will be deprecated and removed in
558+
* the future.
550559
*/
551-
deprecated class ParenExpr extends @parenexpr, Expr {
560+
class ParenExpr extends @parenexpr, Expr {
552561
/** Gets the expression between parentheses. */
553562
Expr getExpr() { result = this.getChildExpr(0) }
554563

0 commit comments

Comments
 (0)