Generate C code for if-else-if.

Also remove redundant parentheses in "if ((x bin_op y))", to avoid
triggering a clang -Wparentheses-equality warning.
This commit is contained in:
Nigel Tao committed 2017-06-08 16:22:07 +10:00
1 parent a81752647c
commit 2d0f9d7669
4 files changed
+43 -18

No files matched your search

+4
View File
@@ -71,6 +71,10 @@ func (q *checker) tcheckStatement(n *a.Node) error {
}
}
}
for n := n.If(); n != nil; n = n.ElseIf() {
n.Node().SetTypeChecked()
}
return nil
case a.KJump:
n := n.Jump()