freeVariables: Determine the free (non-local) variables in a C/C++...

Description Usage Arguments Author(s)

Description

This function examines the body of a C/C++ routine or method and finds the references to variables that are neither parameters or declared within the body.

This requires that the TU contain information about the body of routine/methods. This typically requires compiling the code with g++, even if the code is regular C.

Usage

1
freeVariables(def, nodes, vars = list())

Arguments

def

the node defining the routine (not the body)

nodes

the TU parser object providing the list of all the TU nodes

vars

this is a named list of variables that we pass from function to function as we process each expression and build up a collection of local variables that we have encountered within the scope.

Author(s)

Duncan Temple Lang


omegahat/RGCCTranslationUnit documentation built on May 24, 2019, 1:53 p.m.