Don't move function calls before the expression (#4413)

This commit is contained in:
Ryszard Rozak
2023-08-28 15:44:41 +02:00
committed by GitHub
parent 63db60f646
commit e24197fd16
15 changed files with 55 additions and 41 deletions
+4 -1
View File
@@ -550,7 +550,10 @@ private:
ss << '"';
V3EmitV::verilogForTree(sensesp, ss);
ss << '"';
auto* const commentp = new AstCExpr{sensesp->fileline(), ss.str(), 0};
// possibly a multiline string
std::string comment = ss.str();
std::replace(comment.begin(), comment.end(), '\n', ' ');
AstCExpr* const commentp = new AstCExpr{sensesp->fileline(), comment, 0};
commentp->dtypeSetString();
sensesp->user2p(commentp);
return commentp;