Function SgNodeHelper::correspondingSgFunctionDefinition

Function SgNodeHelper::correspondingSgFunctionDefinition#

Function Documentation#

SgFunctionDefinition *SgNodeHelper::correspondingSgFunctionDefinition(SgNode *node)#

this function should only be called for a node in the subtree of a SgFunctionDefinition node. For a given ‘node’ it determines the correspondnig functionDefinition node when searching upwards in the AST for such a SgFunctionDefinition node. It is useful as a simple lookup function from inside the AST subtree of a SgFunctionDefinition. Returns 0 if no SgFunctionDefinition is found (e.g. global scope).