io.joern.c2cpg.astcreation

Members list

Type members

Classlikes

class AstCreator(val filename: String, val global: Global, val config: Config, val cdtAst: IASTTranslationUnit, val file2OffsetTable: ConcurrentHashMap[String, Array[Int]])(implicit withSchemaValidation: ValidationMode) extends AstCreatorBase, AstForTypesCreator, AstForFunctionsCreator, AstForPrimitivesCreator, AstForStatementsCreator, AstForExpressionsCreator, AstNodeBuilder, AstCreatorHelper, MacroHandler, AstNodeBuilder[IASTNode, AstCreator]

Translates the Eclipse CDT AST into a CPG AST.

Translates the Eclipse CDT AST into a CPG AST.

Attributes

Supertypes
trait AstNodeBuilder[IASTNode, AstCreator]
trait MacroHandler
class AstCreatorBase
class Object
trait Matchable
class Any
Show all

Attributes

Companion
trait
Supertypes
class Object
trait Matchable
class Any
Self type
trait AstCreatorHelper(implicit withSchemaValidation: ValidationMode)

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
Known subtypes
class AstCreator
Self type
trait AstForExpressionsCreator(implicit withSchemaValidation: ValidationMode)

Attributes

Supertypes
class Object
trait Matchable
class Any
Known subtypes
class AstCreator
Self type
trait AstForFunctionsCreator(implicit withSchemaValidation: ValidationMode)

Attributes

Supertypes
class Object
trait Matchable
class Any
Known subtypes
class AstCreator
Self type
trait AstForPrimitivesCreator(implicit withSchemaValidation: ValidationMode)

Attributes

Supertypes
class Object
trait Matchable
class Any
Known subtypes
class AstCreator
Self type
trait AstForStatementsCreator(implicit withSchemaValidation: ValidationMode)

Attributes

Supertypes
class Object
trait Matchable
class Any
Known subtypes
class AstCreator
Self type
trait AstForTypesCreator(implicit withSchemaValidation: ValidationMode)

Attributes

Supertypes
class Object
trait Matchable
class Any
Known subtypes
class AstCreator
Self type

Attributes

Supertypes
class Object
trait Matchable
class Any
Known subtypes
class AstCreator
Self type
class C2CpgMacroExpansionTracker(stepToTrack: Int) extends MacroExpansionTracker

Attributes

Supertypes
class MacroExpansionTracker
class Object
trait Matchable
class Any
object Defines

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
Defines.type
class MacroArgumentExtractor(tu: IASTTranslationUnit, loc: IASTFileLocation)

Utility class that obtains the arguments of the macro at loc of the translation unit tu (we used CDT's naming convention here.) The way this works is by performing macro expansion using CDT's MacroExpander, which accepts a MacroExpansionTracker, which is informed of arguments as they are determined. The problem is that the default MacroExpansionTracker does not make these arguments available separately but only in a form where all arguments have been merged back into a string.

Utility class that obtains the arguments of the macro at loc of the translation unit tu (we used CDT's naming convention here.) The way this works is by performing macro expansion using CDT's MacroExpander, which accepts a MacroExpansionTracker, which is informed of arguments as they are determined. The problem is that the default MacroExpansionTracker does 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 MacroExpansionTracker and overrides the method setExpandedMacroArgument, 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 method getArguments of the MacroArgumentExtractor.

This class must be in this package in order to have access to PreprocessorMacro.

Attributes

Supertypes
class Object
trait Matchable
class Any
trait MacroHandler(implicit withSchemaValidation: ValidationMode)

Attributes

Supertypes
class Object
trait Matchable
class Any
Known subtypes
class AstCreator
Self type