This patch allows the constant evaluator to use APValueResults from ConstantExprs.
There are some outstanding concerns I'll mark with inline comments.
Differential D76438
ConstantExpr cached APValues if present for constant evaluation wchilders on Mar 19 2020, 10:50 AM. Authored by
Details This patch allows the constant evaluator to use APValueResults from ConstantExprs. There are some outstanding concerns I'll mark with inline comments.
Diff Detail
Event Timeline
Comment Actions Updated to assume LValue ConstantExprs have LValue APValues, with verification in debug mode. Additionally, added a missing LValue -> RValue conversion for VerifyIntegerConstantExpression.
Comment Actions I should note, I don't have commit access, so I'm unable to commit this myself. Attribution would be Wyatt Childers <wchilders@lock3software.com> |
IgnoreParensSingleStep for some reason has been unwrapping ConstantExprs. This results in the constant evaluator, removing the ConstantExpr, and reevaluating the expression. There are no observed downsides to removing this condition, in the test suite, however, it's strange enough to note.