skipCfg
1 parent b9a4202 commit e5403b2Copy full SHA for e5403b2
1 file changed
go/ql/lib/semmle/go/controlflow/ControlFlowGraphImpl.qll
@@ -63,6 +63,12 @@ module CfgImpl {
63
private module Ast implements CfgLib::AstSig<Go::Location> {
64
class AstNode = Go::AstNode;
65
66
+ /**
67
+ * Holds if `e` is excluded from ordinary AST child traversal by `getChild`.
68
+ * This does not exclude `e` from the CFG entirely: specialized accessors and
69
+ * explicit control-flow steps can still use it, for example as a type-switch
70
+ * pattern or a select-receive assignment target.
71
+ */
72
private predicate skipCfg(AstNode e) {
73
e instanceof Go::TypeExpr and not e instanceof Go::FuncTypeExpr
74
or
0 commit comments