mirror of
https://github.com/github/codeql.git
synced 2026-07-06 20:15:37 +02:00
Allow the neighborhood to be the entire enclosing function
This commit is contained in:
@@ -185,8 +185,7 @@ module NeighborhoodBodies {
|
||||
*/
|
||||
Raw::AstNode getNeighborhoodAstNode(Raw::AstNode node) {
|
||||
if
|
||||
// `node` will always have a parent as we start at and endpoint
|
||||
node.getParentNode() = getOutermostEnclosingFunction(node) or
|
||||
node = getOutermostEnclosingFunction(node) or
|
||||
getNumDescendents(node.getParentNode()) > maxNumDescendants()
|
||||
then result = node
|
||||
else result = getNeighborhoodAstNode(node.getParentNode())
|
||||
|
||||
Reference in New Issue
Block a user