[all-commits] [llvm/llvm-project] de2170: CWG2352: Allow qualification conversions during re...

Richard Smith via All-commits all-commits at lists.llvm.org
Thu Dec 19 18:56:23 PST 2019


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: de21704ba96fa80d3e9402f12c6505917a3885f4
      https://github.com/llvm/llvm-project/commit/de21704ba96fa80d3e9402f12c6505917a3885f4
  Author: Richard Smith <richard at metafoo.co.uk>
  Date:   2019-12-19 (Thu, 19 Dec 2019)

  Changed paths:
    M clang/include/clang/Basic/DiagnosticSemaKinds.td
    M clang/lib/Sema/SemaExprCXX.cpp
    M clang/lib/Sema/SemaInit.cpp
    M clang/lib/Sema/SemaOverload.cpp
    M clang/test/CXX/drs/dr23xx.cpp
    M clang/test/CXX/drs/dr4xx.cpp
    M clang/test/SemaObjCXX/arc-overloading.mm
    M clang/test/SemaOpenCL/address-spaces-conversions-cl2.0.cl
    M clang/www/cxx_dr_status.html
    M clang/www/make_cxx_dr_status

  Log Message:
  -----------
  CWG2352: Allow qualification conversions during reference binding.

The language wording change forgot to update overload resolution to rank
implicit conversion sequences based on qualification conversions in
reference bindings. The anticipated resolution for that oversight is
implemented here -- we order candidates based on qualification
conversion, not only on top-level cv-qualifiers.

For OpenCL/C++, this allows reference binding between pointers with
differing (nested) address spaces. This makes the behavior of reference
binding consistent with that of implicit pointer conversions, as is the
purpose of this change, but that pre-existing behavior for pointer
conversions is itself probably not correct. In any case, it's now
consistently the same behavior and implemented in only one place.




More information about the All-commits mailing list