Anastasia added inline comments.
Comment at: lib/Sema/SemaInit.cpp:4806-4808
+ if ((RefRelationship == Sema::Ref_Related &&
+ (T1CVRQuals | T2CVRQuals) != T1CVRQuals) ||
+ !T1Quals.isAddressSpaceSupersetOf(T2Quals)) {
ebevhan wrote:
> Sorry for the
ebevhan added inline comments.
Comment at: lib/Sema/SemaInit.cpp:4806-4808
+ if ((RefRelationship == Sema::Ref_Related &&
+ (T1CVRQuals | T2CVRQuals) != T1CVRQuals) ||
+ !T1Quals.isAddressSpaceSupersetOf(T2Quals)) {
Sorry for the really late comment
This revision was automatically updated to reflect the committed changes.
Closed by commit rC355499: [PR40778] Add addr space conversion when binding
reference to a temporary. (authored by stulova, committed by ).
Herald added a project: clang.
Changed prior to commit:
rjmccall accepted this revision.
rjmccall added a comment.
This revision is now accepted and ready to land.
This test file will probably grow over time, so please add a CHECK-LABEL line
to the test case to make sure you're checking the body of foo(). Also, you'll
probably need to allow the
Anastasia updated this revision to Diff 189313.
Anastasia added a comment.
- Implement the fix correctly by added an extra address space conversion step
after binding the reference
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D58634/new/
https://reviews.llvm.org/D58634
Files:
Anastasia marked an inline comment as done.
Anastasia added inline comments.
Comment at: lib/CodeGen/CGCall.cpp:4067
+ IRFuncTy->getParamType(FirstIRArg)->isPointerTy())
+V = Builder.CreatePointerBitCastOrAddrSpaceCast(
+V,
rjmccall added inline comments.
Comment at: lib/CodeGen/CGCall.cpp:4067
+ IRFuncTy->getParamType(FirstIRArg)->isPointerTy())
+V = Builder.CreatePointerBitCastOrAddrSpaceCast(
+V, IRFuncTy->getParamType(FirstIRArg));
Anastasia marked an inline comment as done.
Anastasia added inline comments.
Comment at: lib/CodeGen/CGCall.cpp:4067
+ IRFuncTy->getParamType(FirstIRArg)->isPointerTy())
+V = Builder.CreatePointerBitCastOrAddrSpaceCast(
+V,
Anastasia created this revision.
Anastasia added reviewers: rjmccall, ebevhan.
This is fixing one of the issues reported in the bug:
https://bugs.llvm.org/show_bug.cgi?id=40778
https://reviews.llvm.org/D58634
Files:
lib/CodeGen/CGCall.cpp
test/CodeGenOpenCLCXX/addrspace-references.cl