[all-commits] [llvm/llvm-project] b102e6: [OpenCL] Fix overloading resolution of addrspace c...
Ole Strøhm via All-commits
all-commits at lists.llvm.org
Fri Jun 11 03:14:06 PDT 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: b102e6880ab06654f945284a520f68c099732f44
https://github.com/llvm/llvm-project/commit/b102e6880ab06654f945284a520f68c099732f44
Author: Ole Strohm <olemarius.strohm at arm.com>
Date: 2021-06-11 (Fri, 11 Jun 2021)
Changed paths:
M clang/lib/Sema/SemaOverload.cpp
M clang/test/CodeGenOpenCLCXX/addrspace-constructors.clcpp
M clang/test/SemaOpenCLCXX/addrspace-constructors.clcpp
Log Message:
-----------
[OpenCL] Fix overloading resolution of addrspace constructors
This fixes the prioritization of address spaces when choosing a
constructor, stopping them from being considered equally good,
which made the construction of types that could be constructed
by more than one of the constructors.
It does this by preferring the most specific address space,
which is decided by seeing if one of the address spaces is
a superset of the other, and preferring the other.
Fixes: PR50329
Reviewed By: Anastasia
Differential Revision: https://reviews.llvm.org/D102850
More information about the All-commits
mailing list