This simple patch fixes the assertion which happens in ScalarExprEmitter::VisitInitListExpr when we try to compute the expression and ignore the result.
the test case here is reduced by c-reduce.
TestPlan: check-clang
Differential D76118
[Coroutines] Do not evaluate InitListExpr of a co_return junparser on Mar 12 2020, 11:22 PM. Authored by
Details This simple patch fixes the assertion which happens in ScalarExprEmitter::VisitInitListExpr when we try to compute the expression and ignore the result. the test case here is reduced by c-reduce. TestPlan: check-clang
Diff Detail
Event TimelineComment Actions Awesome, thank you! This is an issue I've been running into as well in an internal codebase, I'll check whether this patch addresses it. My suspicion is that the test case could be reduced further, but the implementation itself seems like a straightforward improvement to me.
Comment Actions @modocache thanks.
|
nit-pick: I slightly prefer "initializer list" over "initlist", but it's your call.