Anastasia added a comment.

In D65744#1627589 <https://reviews.llvm.org/D65744#1627589>, @rjmccall wrote:

> I see.  Is the deduction rule recursive or something, where a pointer to 
> pointer is inferred to point to the same address space as the pointee?


It is recursive indeed and we currently deduce all pointees to generic AS.

> I still don't understand why pointers and references are handled differently 
> here, instead of having the rule be "don't infer if the type is opaquely 
> dependent or an `auto` placeholder".

Because we currently only infer pointers and references in TreeTransforms. 
Everything else is inferred earlier. That is mainly because we need some 
context info to infer in most of other cases and therefore it's not easy to do 
in TreeTransforms. There is some more information on this review: 
https://reviews.llvm.org/D64400 where the inference for pointers and references 
was added originally to TreeTransforms.


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

https://reviews.llvm.org/D65744



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

Reply via email to