use inc/ina instead of adc

This commit is contained in:
Irmen de Jong
2021-11-29 00:07:15 +01:00
parent cafab98d10
commit 45b8762188
4 changed files with 11 additions and 10 deletions

View File

@@ -110,7 +110,6 @@ internal class ConstantIdentifierReplacer(private val program: Program, private
override fun before(decl: VarDecl, parent: Node): Iterable<IAstModification> {
// the initializer value can't refer to the variable itself (recursive definition)
// TODO: use call graph for this?
if(decl.value?.referencesIdentifier(listOf(decl.name)) == true || decl.arraysize?.indexExpr?.referencesIdentifier(listOf(decl.name)) == true) {
errors.err("recursive var declaration", decl.position)
return noModifications