[PATCH] D55656: [OpenCL] Address space for default class members
Mikael Nilsson via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Dec 13 07:41:56 PST 2018
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
More information about the cfe-commits
mailing list