[PATCH] D54356: Convert CheckICE into a statment visitor
Richard Smith - zygoloid via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Nov 13 12:43:19 PST 2018
rsmith added a comment.
In https://reviews.llvm.org/D54356#1297470, @rsmith wrote:
> Can you explain more about the justification for this? The code today has a covered switch, which is useful for maintainability -- anyone adding a new `Expr` node gets told they need to think about and update this code. Are there any cases where we check for an ICE and aren't in a constant context? I would have expected that the fact we're asking implies that we are in a constant context (at least when the answer is "yes").
Oh, I see, you want to temporarily set "IsConstantContext" to true while evaluating the subexpression of a `ConstantExpr`. I think that's unnecessary, because anywhere we ask "is this syntactically an ICE?", we always want to evaluate as if in a constant context (unlike places where we run the evaluator on an expression, where that doesn't necessarily imply anything in particular about the nature of the expression.)
Repository:
rC Clang
https://reviews.llvm.org/D54356
More information about the cfe-commits
mailing list