summaryrefslogtreecommitdiff
path: root/src/chillASTs.cc
diff options
context:
space:
mode:
authorTuowen Zhao <ztuowen@gmail.com>2016-10-07 18:43:39 -0600
committerTuowen Zhao <ztuowen@gmail.com>2016-10-07 18:43:39 -0600
commit7bbd1a207f65428283471f1cc956f3fda43fbe3e (patch)
treef8febd1c59ad6aa5f071aa8644a4961b163cfb77 /src/chillASTs.cc
parent79866eaaf708759db9458e60bb4ea51799608f2e (diff)
downloadchill-7bbd1a207f65428283471f1cc956f3fda43fbe3e.tar.gz
chill-7bbd1a207f65428283471f1cc956f3fda43fbe3e.tar.bz2
chill-7bbd1a207f65428283471f1cc956f3fda43fbe3e.zip
fixes
Diffstat (limited to 'src/chillASTs.cc')
-rw-r--r--src/chillASTs.cc11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/chillASTs.cc b/src/chillASTs.cc
index 701832e..6f9f845 100644
--- a/src/chillASTs.cc
+++ b/src/chillASTs.cc
@@ -22,8 +22,10 @@ char *parseUnderlyingType(const char *sometype) {
while (p > underlying)
if (*p == ' ' || *p == '*')
--p;
- else if (*p == ']')
+ else if (*p == ']') {
while (*p != '[') --p;
+ --p;
+ }
else break;
*(p + 1) = '\0';
@@ -1751,6 +1753,11 @@ chillAST_ImplicitCastExpr::chillAST_ImplicitCastExpr() {
children.push_back(NULL);
}
+chillAST_Node* chillAST_ImplicitCastExpr::constantFold() {
+ chillAST_Node::constantFold();
+ return getSubExpr();
+}
+
chillAST_ImplicitCastExpr::chillAST_ImplicitCastExpr(chillAST_Node *sub) : chillAST_ImplicitCastExpr() {
setSubExpr(sub);
}
@@ -1908,7 +1915,7 @@ class chillAST_Node *chillAST_ReturnStmt::clone() {
}
chillAST_CallExpr::chillAST_CallExpr() {
- addChild(NULL);
+ children.push_back(NULL);
}
chillAST_CallExpr::chillAST_CallExpr(chillAST_Node *c) : chillAST_CallExpr() {