You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
João Bispo edited this page May 19, 2022
·
3 revisions
$function
$function.canonical, .isCanonical
In C/C++ you can have several nodes $function for the "same" function: one for the definition (or implementation) of the function, and one for each of the declarations (or prototypes).
In some cases it might be useful to treat all those cases as the same function, which is what $function.canonical does. It gives priority to the function definition, and if it does not exist, returns the first function declaration. $call.function also returns the canonical function.
$function.isCanonical returns true if the function is already canonical, and false otherwise.