Create cfg node for child of ParenExpr

This commit is contained in:
Owen Mansel-Chan
2026-05-14 00:21:08 +01:00
parent 2d46e22b37
commit 39697ee971

View File

@@ -62,7 +62,11 @@ module GoCfg {
}
AstNode getChild(AstNode n, int index) {
not skipCfg(result) and not skipCfg(n) and result = n.getChild(index)
not skipCfg(n) and
not skipCfg(result) and
exists(Go::AstNode c | c = n.getChild(index) |
if c instanceof Go::ParenExpr then result = c.(Go::ParenExpr).stripParens() else result = c
)
}
class Callable extends AstNode {