commit 7e1bf6d29b8c644096058a9444614b65055ee9df (tree)
parent a260cfa4dd7837668b44432335f88c09b12423cd
Author: Josh Wolfe <thejoshwolfe@gmail.com>
Date: Fri, 1 Sep 2017 11:45:06 -0700
progress toward variable declaration translation
Diffstat:
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/src/parseh.cpp b/src/parseh.cpp
@@ -1198,13 +1198,11 @@ static AstNode * trans_local_declaration(Context *c, AstNode *block, DeclStmt *s
node->data.variable_declaration.symbol = buf_create_from_str(decl_name(var_decl));
QualType qual_type = var_decl->getTypeSourceInfo()->getType();
node->data.variable_declaration.is_const = qual_type.isConstQualified();
- node->data.variable_declaration.type = trans_qual_type(c, block, qual_type);
+ node->data.variable_declaration.type = trans_qual_type(c, qual_type, stmt->getStartLoc());
if (var_decl->hasInit()) {
node->data.variable_declaration.expr = trans_expr(c, block, var_decl->getInit());
}
- //emit_warning(c, decl->getLocation(), "asdf");
-
block->data.block.statements.append(node);
continue;
}