[PATCH] D83665: [OpenCL] Fixed missing address space for templated copy constructor
Anastasia Stulova via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Jul 20 10:20:58 PDT 2020
Anastasia added inline comments.
================
Comment at: clang/lib/Sema/SemaTemplateDeduction.cpp:3811
+ if(S.getLangOpts().OpenCL)
+ ArgType = S.deduceOpenCLPointeeAddrSpace(ArgType);
ArgType = S.Context.getLValueReferenceType(ArgType);
----------------
olestrohm wrote:
> 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.
Ok since there are no known cases for named address spaces now, we could just use generic. We can always extend this later if we find that any other address space is needed.
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