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

================
Comment at: lib/Sema/SemaInit.cpp:4539
+  if (InitCategory.isPRValue() || InitCategory.isXValue())
+    T1Quals.removeAddressSpace();
+
----------------
This is probably not the correct way to solve this. But it fixes the issues 
that i get. 

The code that triggers this issue is found in 
test/CodeGenOpenCLCXX/addrspace-of-this.cl:47

```
C c3 = c1 + c2;
```

So the original (InitializedEntity) Entity.getType()  looks like:

```
RValueReferenceType 0x717470 '__generic class C &&'
`-QualType 0x717458 '__generic class C' __generic
  `-RecordType 0x717160 'class C'
    `-CXXRecord 0x7170d0 'C'
```

It might be so that we actually want to qualify the RValueReferenceType rather 
than the RecordType here. 


Repository:
  rC Clang

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

https://reviews.llvm.org/D55656



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to