================
@@ -194,7 +194,7 @@ class Dependence {
   TypeDependence type() const {
     return translate(V, UnexpandedPack, TypeDependence::UnexpandedPack) |
            translate(V, Instantiation, TypeDependence::Instantiation) |
-           translate(V, Dependent, TypeDependence::Dependent) |
+           translate(V, Type, TypeDependence::Dependent) |
----------------
mizvekov wrote:

Yeah, so there is a non-obvious choice here, when "translating" expression 
dependence to type dependence.

If an expression is part of a type, should value dependence count as type 
dependence?

Under the post CWG2064 model, this is obviously not the case anymore for 
`decltype`.
It was not the case for `typeof` as well, but this was handled manually.

I think this change of default to `no` is justified, because for most other 
types, an expression is already expected to be value dependent. For example, 
for an array type, if the expression is value dependent, this will be handled 
through a special type node (DependentArrayType) which is always type dependent 
anyway.

https://github.com/llvm/llvm-project/pull/190495
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to