[PATCH] D70605: [OpenCL] Fix address space for implicit conversion (PR43145)

Sven van Haastregt via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Nov 26 07:30:23 PST 2019


svenvh added a comment.

In D70605#1759614 <https://reviews.llvm.org/D70605#1759614>, @rjmccall wrote:

> Is there a similar problem with reference parameters?


It doesn't seem so, patching the test as follows gives reasonable output.

  @@ -73,8 +73,10 @@ void pr43145_3(int n) {
   // Implicit conversion of derived to base.
   
   void functionWithBaseArg(class B2 *b) {}
  +void functionWithBaseArgRef(class B2 &b) {}
   
   void pr43145_4() {
     Derived d;
     functionWithBaseArg(&d);
  +  functionWithBaseArgRef(d);
   }


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

https://reviews.llvm.org/D70605





More information about the cfe-commits mailing list