Class CXXLanguageFrontend


  • public class CXXLanguageFrontend
    extends LanguageFrontend
    The language frontend for translating CXX languages into the graph. It uses Eclipse CDT to parse the actual source code into an AST.

    Frontend for ONE CXX File

    • Field Detail

      • LONG_TYPE

        public static final Type LONG_TYPE
      • TYPE_UNSIGNED_LONG_LONG

        public static final Type TYPE_UNSIGNED_LONG_LONG
      • INT_TYPE

        public static final Type INT_TYPE
      • LONG_LONG_TYPE

        public static final Type LONG_LONG_TYPE
      • TYPE_UNSIGNED_LONG

        public static final Type TYPE_UNSIGNED_LONG
    • Method Detail

      • getCodeFromRawNode

        public <T> @Nullable java.lang.String getCodeFromRawNode​(T astNode)
        Description copied from class: LanguageFrontend
        Returns the raw code of the ast node, generic for java or c++ ast nodes.
        Specified by:
        getCodeFromRawNode in class LanguageFrontend
        Type Parameters:
        T - the raw ast type
        Parameters:
        astNode - the ast node
        Returns:
        the source code
      • getLocationFromRawNode

        public <T> @NonNull PhysicalLocation getLocationFromRawNode​(T astNode)
        Description copied from class: LanguageFrontend
        Returns the Region of the code with line and column, index starting at 1, generic for java or c++ ast nodes.
        Specified by:
        getLocationFromRawNode in class LanguageFrontend
        Type Parameters:
        T - the raw ast type
        Parameters:
        astNode - the ast node
        Returns:
        the location
      • expressionRefersToDeclaration

        public void expressionRefersToDeclaration​(Expression expression,
                                                  org.eclipse.cdt.core.dom.ast.IASTExpression iastExpression)
      • cacheDeclaration

        public @Nullable Declaration cacheDeclaration​(org.eclipse.cdt.core.dom.ast.IBinding binding,
                                                      Declaration declaration)
      • getCachedDeclaration

        public Declaration getCachedDeclaration​(org.eclipse.cdt.core.dom.ast.IBinding binding)
      • getDeclarationListHandler

        public de.fraunhofer.aisec.cpg.frontends.cpp.DeclarationListHandler getDeclarationListHandler()
      • getDeclaratorHandler

        public de.fraunhofer.aisec.cpg.frontends.cpp.DeclaratorHandler getDeclaratorHandler()
      • getExpressionHandler

        public de.fraunhofer.aisec.cpg.frontends.cpp.ExpressionHandler getExpressionHandler()
      • getStatementHandler

        public de.fraunhofer.aisec.cpg.frontends.cpp.StatementHandler getStatementHandler()