[PATCH] D65744: [PR42707][OpenCL] Fix addr space deduction for auto

Anastasia Stulova via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Sep 4 04:03:13 PDT 2019


Anastasia added a comment.

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

> In D65744#1652355 <https://reviews.llvm.org/D65744#1652355>, @Anastasia wrote:
>
> > I don't think this is likely to change. Are you suggesting to move the deduction logic for pointee of pointers, references and block pointers into ASTContext helper that creates a pointer/reference/block pointer type?
>
>
> No.  I'm suggesting that the deduction logic should be much more straightforward, just some sort of "is the type non-dependent and lacking a qualifier", and it should be applied in the two basic places we build these types in Sema, i.e. in the type-from-declarator logic and in the `Build{Pointer,Reference}Type` logic.


Ok thanks, I made this change now.

> Instead we have something very elaborate that apparently recursively looks through pointer types and is contingent on the exact spelling, e.g. trying to find `auto` types, which seems both brittle and unnecessary.

I realized that I didn't have to do this actually. It was done by mistake earlier.


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

https://reviews.llvm.org/D65744





More information about the cfe-commits mailing list