JS: Remove parenthesized expressions from AST by asgerf · Pull Request #21427 · github/codeql
bot
added
the
JS
label
The LanguageVersionTests require all relations with multiple columns to have dependency stats between each pair of columns. The has_parentheses relation was missing these dependency entries. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
When a parenthesized expression is the callee/object of an optional chain step (e.g. `(null)?.()`), the postVisitChainable method was writing CFG successor edges FROM the ParenthesizedExpression node. Since ParenthesizedExpression nodes are now bypassed and have no DB entry, this caused VALUE_NOT_IN_TYPE errors in the successor relation. Fix by unwrapping ParenthesizedExpression before writing the successor edge, so the edge is written from the inner expression instead. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- WhitespaceContradictsPrecedence: suppress false positives where parenthesized inner expressions explicitly clarify precedence - ExprHasNoEffect: continue flagging parenthesized anonymous function expressions as useless (they are valid code, not syntax errors) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters