[PATCH] D62156: [Sema][PR41730] Diagnose addr space mismatch while constructing objects

Anastasia Stulova via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 20 09:42:37 PDT 2019


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


================
Comment at: test/SemaCXX/address-space-ctor.cpp:11
+//expected-note at -6{{candidate constructor (the implicit move constructor) not viable: no known conversion from 'int' to 'MyType &&' for 1st argument}}
+//expected-note at -6{{candidate constructor ignored: cannot be used to construct an object in address space '__attribute__((address_space(10)))'}}
+//expected-note at -8{{candidate constructor ignored: cannot be used to construct an object in address space '__attribute__((address_space(10)))'}}
----------------
rjmccall wrote:
> Anastasia wrote:
> > Not sure if we should change to:
> >   cannot be used to construct an object with '__attribute__((address_space(10)))'
> > 
> > Although for OpenCL it would be ok as is.
> > 
> > Or may be it's better to add custom printing of addr spaces?
> Some sort of custom printing of address spaces would probably be best, yeah.  Users probably think of them as whatever custom syntax/macro they normally write, not as an application of some weird attribute.  We do a similar sort of thing with vector types where we generally just print them as `float4` or whatever without an `aka` clause because we don't expect anyone to know about those attributes.
Ok, sure. I will look into it later. Thanks!


Repository:
  rL LLVM

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

https://reviews.llvm.org/D62156





More information about the llvm-commits mailing list