Skip to content

Commit

Permalink
Fixed test
Browse files Browse the repository at this point in the history
  • Loading branch information
oxisto committed Apr 11, 2024
1 parent b6087c6 commit 7e9487b
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ package de.fraunhofer.aisec.cpg.frontends

import de.fraunhofer.aisec.cpg.ScopeManager
import de.fraunhofer.aisec.cpg.TranslationContext
import de.fraunhofer.aisec.cpg.graph.Node
import de.fraunhofer.aisec.cpg.graph.declarations.FunctionDeclaration
import de.fraunhofer.aisec.cpg.graph.declarations.RecordDeclaration
import de.fraunhofer.aisec.cpg.graph.declarations.TranslationUnitDeclaration
Expand Down Expand Up @@ -215,9 +214,7 @@ interface HasAnonymousIdentifier : LanguageTrait {
* [GlobalScope], i.e., not within a namespace, but directly contained in a
* [TranslationUnitDeclaration].
*/
interface HasGlobalVariables : LanguageTrait {
val globalVariableScopeClass: Class<out Node>
}
interface HasGlobalVariables : LanguageTrait

/**
* A language trait, that specifies that the language has so-called functional style casts, meaning
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,7 @@ open class SymbolResolver(ctx: TranslationContext) : ComponentPass(ctx) {

// This is a little bit of a workaround, but at least this makes sure we are not inferring a
// record, where a namespace already exist
val (scope, _) = scopeManager.extractScope(reference)
val (scope, _) = scopeManager.extractScope(reference, null)
return if (scope == null) {
handleUnknownField(containingClass, reference)
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@ package de.fraunhofer.aisec.cpg.frontends.cxx

import com.fasterxml.jackson.annotation.JsonIgnore
import de.fraunhofer.aisec.cpg.frontends.*
import de.fraunhofer.aisec.cpg.graph.Node
import de.fraunhofer.aisec.cpg.graph.declarations.TranslationUnitDeclaration
import de.fraunhofer.aisec.cpg.graph.types.*
import kotlin.reflect.KClass
import org.neo4j.ogm.annotation.Transient
Expand All @@ -53,9 +51,6 @@ open class CLanguage :

val unaryOperators = listOf("--", "++", "-", "+", "*", "&", "~")

override val globalVariableScopeClass: Class<out Node>
get() = TranslationUnitDeclaration::class.java

/**
* All operators which perform and assignment and an operation using lhs and rhs. See
* https://en.cppreference.com/w/c/language/operator_assignment
Expand Down

0 comments on commit 7e9487b

Please sign in to comment.