[PATCH] D109609: [C++4OpenCL] Add support for multiple address spaced destructors

Ole Strohm via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Sep 17 07:45:31 PDT 2021


olestrohm marked 2 inline comments as done.
olestrohm added inline comments.


================
Comment at: clang/lib/Sema/SemaLookup.cpp:3082
   ID.AddInteger(VolatileThis);
+  ID.AddInteger((unsigned)AS);
 
----------------
Anastasia wrote:
> Btw ctors and assignments don't seem to need this but they seem to work fine though... 
> 
> 
> For example here the right assignment overload with `__local` address space is selected
> https://godbolt.org/z/aYKj4W6rc
> or ctor overload with `__global` is selected here correctly:
> https://godbolt.org/z/1frheezE5
> 
> So it seems like there is some other logic to handle address spaces for special members elsewhere? Although it is very strange and rather confusing.
Yes, it seems other special members are handled somewhere else according to my preliminary investigations, so that might explain why address spaces where never introduced into this function.


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

https://reviews.llvm.org/D109609



More information about the cfe-commits mailing list