[PATCH] D55850: [OpenCL] Allow address spaces as method qualifiers

Anastasia Stulova via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jan 2 03:37:10 PST 2019


Anastasia marked an inline comment as done.
Anastasia added inline comments.


================
Comment at: lib/Sema/SemaOverload.cpp:2828
 
   // FIXME: OpenCL: Need to consider address spaces
   unsigned FromQuals = FromFunction->getTypeQuals().getCVRUQualifiers();
----------------
rjmccall wrote:
> Anastasia wrote:
> > I am still missing something here.
> Well, at least the failure here is just to fall into the generic diagnostic.
> 
> Getting this diagnostic right probably requires some minor work to the diagnostics engine.  If you look at `err_init_conversion_failed`, which is (I think) the diagnostic that's always being used here, it matches every possible CVR mask so that it can pretty-print them.  This is already a problem because the input is actually a CVRU mask!  A better option would be to teach `DiagnosticEngine` how to store and format a `Qualifiers` value, and then you can just stream the original `Qualifiers` into the diagnostic here.
> 
> But that's obviously work for a separate patch.
I created a patch for this in https://reviews.llvm.org/D56198.


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

https://reviews.llvm.org/D55850





More information about the cfe-commits mailing list