diff --git a/cpg-core/src/main/kotlin/de/fraunhofer/aisec/cpg/frontends/Language.kt b/cpg-core/src/main/kotlin/de/fraunhofer/aisec/cpg/frontends/Language.kt index f522474f52c..cf099ea84c6 100644 --- a/cpg-core/src/main/kotlin/de/fraunhofer/aisec/cpg/frontends/Language.kt +++ b/cpg-core/src/main/kotlin/de/fraunhofer/aisec/cpg/frontends/Language.kt @@ -34,9 +34,11 @@ import de.fraunhofer.aisec.cpg.TranslationContext import de.fraunhofer.aisec.cpg.graph.Name import de.fraunhofer.aisec.cpg.graph.Node import de.fraunhofer.aisec.cpg.graph.statements.expressions.BinaryOperator +import de.fraunhofer.aisec.cpg.graph.statements.expressions.CastExpression import de.fraunhofer.aisec.cpg.graph.types.* import de.fraunhofer.aisec.cpg.graph.types.Type import de.fraunhofer.aisec.cpg.graph.unknownType +import de.fraunhofer.aisec.cpg.helpers.Util import java.io.File import kotlin.reflect.KClass import kotlin.reflect.full.primaryConstructor diff --git a/cpg-language-cxx/src/test/kotlin/de/fraunhofer/aisec/cpg/frontends/cxx/CXXLanguageFrontendTest.kt b/cpg-language-cxx/src/test/kotlin/de/fraunhofer/aisec/cpg/frontends/cxx/CXXLanguageFrontendTest.kt index b618ca00f92..13ac72bb791 100644 --- a/cpg-language-cxx/src/test/kotlin/de/fraunhofer/aisec/cpg/frontends/cxx/CXXLanguageFrontendTest.kt +++ b/cpg-language-cxx/src/test/kotlin/de/fraunhofer/aisec/cpg/frontends/cxx/CXXLanguageFrontendTest.kt @@ -638,11 +638,19 @@ internal class CXXLanguageFrontendTest : BaseTest() { // a = b * 2 var assign = statements[2] as? AssignExpression assertNotNull(assign) +<<<<<<< HEAD var ref = assign.lhs() assertNotNull(ref) assertLocalName("a", ref) +======= + + var ref = assign.lhs() + assertNotNull(ref) + assertLocalName("a", ref) + +>>>>>>> f8cf854d8 (Overhaul of type propagation (#1268)) var binOp = assign.rhs() assertNotNull(binOp) @@ -658,10 +666,23 @@ internal class CXXLanguageFrontendTest : BaseTest() { ref = assign.lhs() assertNotNull(ref) assertLocalName("a", ref) +<<<<<<< HEAD +======= +<<<<<<< HEAD +>>>>>>> f8cf854d8 (Overhaul of type propagation (#1268)) + + binOp = assign.rhs() + assertNotNull(binOp) + +<<<<<<< HEAD +======= +======= binOp = assign.rhs() assertNotNull(binOp) +>>>>>>> 490562dce (Overhaul of type propagation (#1268)) +>>>>>>> f8cf854d8 (Overhaul of type propagation (#1268)) assertTrue(binOp.lhs is Literal<*>) assertEquals(1, (binOp.lhs as Literal<*>).value) assertTrue(binOp.rhs is Literal<*>)