package scanner
Type Members
- class C2CpgMacroExpansionTracker extends MacroExpansionTracker
- class MacroArgumentExtractor extends AnyRef
Utility class that obtains the arguments of the macro at
locof the translation unittu(we used CDT's naming convention here.) The way this works is by performing macro expansion using CDT'sMacroExpander, which accepts aMacroExpansionTracker, which is informed of arguments as they are determined.Utility class that obtains the arguments of the macro at
locof the translation unittu(we used CDT's naming convention here.) The way this works is by performing macro expansion using CDT'sMacroExpander, which accepts aMacroExpansionTracker, which is informed of arguments as they are determined. The problem is that the defaultMacroExpansionTrackerdoes not make these arguments available separately but only in a form where all arguments have been merged back into a string.By supplying a custom tracker that inherits from
MacroExpansionTrackerand overrides the methodsetExpandedMacroArgument, we can intercept arguments and store them in a list for later retrieval. We wrap this rather complicated way of accessing the macro arguments in the single public methodgetArgumentsof theMacroArgumentExtractor.This class must be in this package in order to have access to
PreprocessorMacro.