Skip to content

Commit

Permalink
Overhaul of type propagation (#1268)
Browse files Browse the repository at this point in the history
Co-authored-by: Alexander Kuechler <[email protected]>
Co-authored-by: Maximilian Kaul <[email protected]>
  • Loading branch information
3 people committed Aug 9, 2023
1 parent 6192503 commit 9638fff
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -658,10 +658,17 @@ internal class CXXLanguageFrontendTest : BaseTest() {
ref = assign.lhs<DeclaredReferenceExpression>()
assertNotNull(ref)
assertLocalName("a", ref)
<<<<<<< HEAD

binOp = assign.rhs<BinaryOperator>()
assertNotNull(binOp)

=======

binOp = assign.rhs<BinaryOperator>()
assertNotNull(binOp)

>>>>>>> 490562dce (Overhaul of type propagation (#1268))
assertTrue(binOp.lhs is Literal<*>)
assertEquals(1, (binOp.lhs as Literal<*>).value)
assertTrue(binOp.rhs is Literal<*>)
Expand Down

0 comments on commit 9638fff

Please sign in to comment.