[PATCH] D55850: [OpenCL] Allow address spaces as method qualifiers
Bevin Hansson via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Jan 24 06:07:30 PST 2019
ebevhan added inline comments.
================
Comment at: lib/Sema/SemaOverload.cpp:5151
+ if (FromTypeCanon.getQualifiers().hasAddressSpace()) {
+ Qualifiers QualsImplicitParamType = ImplicitParamType.getQualifiers();
----------------
I tested this patch with some kludges to let it parse our address space qualifiers, and hit a problem here; just because the FromType isn't qualified doesn't mean that the object conversion is okay. A conversion of an object `Type` to `__X Type` might not be legal if there is no conversion from 'no address space' to '__X' address space.
The example was a class with an AS-qualified overload, and when resolving for calling the overloaded method on an object `Type *`, it hit an ambiguous resolution since it considered the AS-qualified method to be a legal candidate.
It feels like this might be rather specific to how a language/target wants to use address spaces, though.
Repository:
rC Clang
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D55850/new/
https://reviews.llvm.org/D55850
More information about the cfe-commits
mailing list