We reach visitExpr() when evaluating standalone expressions. However, the RetValue() code path was unused before, because we never reach it, even with structs or arrays. RetValue expects a pointer on the stack it can take apart to return an APValue, so provide it with one.
Details
Details
Diff Detail
Diff Detail
Event Timeline
clang/lib/AST/Interp/ByteCodeExprGen.cpp | ||
---|---|---|
2287 | I added these changes to make the test work, but they are thematically different from the purpose of this patch. However, without them, the test doesn't work. |
Comment Actions
LGTM, but you should change the summary to Allow evaluating standalone complex expressions when landing.
I added these changes to make the test work, but they are thematically different from the purpose of this patch. However, without them, the test doesn't work.