[PATCH] D83665: [OpenCL] Fixed missing address space for templated copy constructor
Ole Strohm via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Jul 20 04:08:58 PDT 2020
olestrohm marked an inline comment as done.
olestrohm added inline comments.
================
Comment at: clang/lib/Sema/SemaTemplateDeduction.cpp:3811
+ if(S.getLangOpts().OpenCL)
+ ArgType = S.deduceOpenCLPointeeAddrSpace(ArgType);
ArgType = S.Context.getLValueReferenceType(ArgType);
----------------
Anastasia wrote:
> I feel we can just add an address space explicitly since we are creating the type here for a known use case. However, does Arg actually have an address space? I am just unsure whether we should use generic address space or concrete address space.
No, there are no known address spaces at this point for the test case I've got. But as far as I understand the function isn't only used for the case we look at here, but there may be case where the argument has an address space.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D83665/new/
https://reviews.llvm.org/D83665
More information about the cfe-commits
mailing list