Class GlobalScope
java.lang.Object
de.fraunhofer.aisec.cpg.passes.scopes.Scope
de.fraunhofer.aisec.cpg.passes.scopes.ValueDeclarationScope
de.fraunhofer.aisec.cpg.passes.scopes.StructureDeclarationScope
de.fraunhofer.aisec.cpg.passes.scopes.GlobalScope
public class GlobalScope extends StructureDeclarationScope
-
Field Summary
Fields inherited from class de.fraunhofer.aisec.cpg.passes.scopes.ValueDeclarationScope
logFields inherited from class de.fraunhofer.aisec.cpg.passes.scopes.Scope
astNode, children, labelStatements, parent, scopedName -
Constructor Summary
Constructors Constructor Description GlobalScope()This should ideally only be called once. -
Method Summary
Modifier and Type Method Description voidmergeFrom(java.util.Collection<GlobalScope> others)Methods inherited from class de.fraunhofer.aisec.cpg.passes.scopes.StructureDeclarationScope
addDeclaration, getStructureDeclarations, setStructureDeclarationsMethods inherited from class de.fraunhofer.aisec.cpg.passes.scopes.ValueDeclarationScope
addTypedef, getTypedefs, getValueDeclarations, setTypedefs, setValueDeclarationsMethods inherited from class de.fraunhofer.aisec.cpg.passes.scopes.Scope
addLabelStatement, getAstNode, getChildren, getLabelStatements, getParent, getScopedName, setAstNode, setChildren, setLabelStatements, setParent, setScopedNameMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
GlobalScope
public GlobalScope()This should ideally only be called once. It constructs a new global scope, which is not associated to any AST node. However, depending on the language, a language frontend can explicitly set the ast node usingScopeManager.resetToGlobal(TranslationUnitDeclaration)if the language needs a global scope that is restricted to a translation unit, i.e. C++ while still maintaing a unique list of global variables.
-
-
Method Details
-
mergeFrom
-