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



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to