Internal cleanup: no functional change.

Add cloneTree to each node type so cast not required after use.
Standardize declaring common AstNode functions via a macro.
This commit is contained in:
Wilson Snyder
2008-11-19 20:15:05 -05:00
parent a4bcb3de4a
commit ab668b066f
15 changed files with 209 additions and 665 deletions
+1 -1
View File
@@ -535,7 +535,7 @@ private:
AstNode* ap = lhsp->lhsp()->unlinkFrBack();
AstNode* bp = lhsp->rhsp()->unlinkFrBack();
AstNodeBiop* shift1p = nodep;
AstNodeBiop* shift2p = nodep->cloneTree(true)->castNodeBiop();
AstNodeBiop* shift2p = nodep->cloneTree(true);
shift1p->lhsp(ap); shift1p->rhsp(shiftp->cloneTree(true));
shift2p->lhsp(bp); shift2p->rhsp(shiftp);
AstNodeBiop* newp = lhsp;