sammccall added a comment.

What's the rationale/motivation for this? I'd expect this to break a lot of 
subtle assumptions, because the invariant "nothing can be dependent without 
being instantiation-dependent" is a useful one.

It also doesn't seem correct from first principles. My mental model is:

- dependence describes code where some properties are unknown because a 
template wasn't instantiated yet
- we've generalized this to "some properties are unknown because we don't know 
what this piece of code is supposed to say"
- we can never know the value at compile-time even in contexts where we should, 
so RecoveryExpr is value-dependent
- we only know the type at compile-time if the RecoveryExpr's type is known and 
not itself dependent, so RecoveryExpr is usually value-dependent
- the code may intend to refer to entities valid only in certain instantiations 
(consider `(void)f(T())` where f is an overloaded function). So RecoveryExpr is 
at least sometimes instantiation-dependent

At best I think we could say that the expr is only instantiation-dependent if 
it occurs in a template scope - otherwise there's no template we might fail to 
instantiate.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D83213/new/

https://reviews.llvm.org/D83213



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

Reply via email to