Skip to content

Commit 2318961

Browse files
committed
DEV: Always alias in CompountStmt node
1 parent d85c4b6 commit 2318961

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/lc/clang_ast_to_asr.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1869,15 +1869,19 @@ class ClangASTtoASRVisitor: public clang::RecursiveASTVisitor<ClangASTtoASRVisit
18691869
}
18701870

18711871
bool TraverseCompoundStmt(clang::CompoundStmt *x) {
1872+
std::map<std::string, std::string> alias;
1873+
scopes.push_back(alias);
18721874
for (auto &s : x->body()) {
18731875
bool is_stmt_created_ = is_stmt_created;
18741876
is_stmt_created = false;
18751877
TraverseStmt(s);
18761878
if( is_stmt_created ) {
18771879
current_body->push_back(al, ASRUtils::STMT(tmp.get()));
1880+
is_stmt_created = false;
18781881
}
1879-
is_stmt_created_ = is_stmt_created;
1882+
is_stmt_created = is_stmt_created_;
18801883
}
1884+
scopes.pop_back();
18811885
return true;
18821886
}
18831887

0 commit comments

Comments
 (0)