[all-commits] [llvm/llvm-project] ef843c: [libc++] Fix ADL for `make_error_{code, condition}`

Jonathan Wakely via All-commits all-commits at lists.llvm.org
Fri Sep 30 14:24:03 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: ef843c8271027b89419d07ffc2aaa3abf91438ef
      https://github.com/llvm/llvm-project/commit/ef843c8271027b89419d07ffc2aaa3abf91438ef
  Author: Jonathan Wakely <jwakely at redhat.com>
  Date:   2022-09-30 (Fri, 30 Sep 2022)

  Changed paths:
    M libcxx/docs/Status/Cxx2bIssues.csv
    M libcxx/include/system_error
    A libcxx/test/std/diagnostics/syserr/syserr.errcode/syserr.errcode.constructors/lwg3629.pass.cpp
    A libcxx/test/std/diagnostics/syserr/syserr.errcode/syserr.errcode.modifiers/lwg3629.pass.cpp
    A libcxx/test/std/diagnostics/syserr/syserr.errcondition/syserr.errcondition.constructors/lwg3629.pass.cpp
    A libcxx/test/std/diagnostics/syserr/syserr.errcondition/syserr.errcondition.modifiers/lwg3629.pass.cpp

  Log Message:
  -----------
  [libc++] Fix ADL for `make_error_{code,condition}`

Implement LWG 3629, by making lookup for make_error_code and
make_error_condition only consider names found by ADL. This is achieved
by adding a block scope using-declaration for a function that will be
found by unqualified lookup, preventing unqualified lookup from
continuing to enclosing scopes (the class scope, then enclosing
namespaces). The function named by the using declaration is not
viable, so overload resolution must select a candidate found by ADL.

This fixes https://github.com/llvm/llvm-project/issues/57614

Differential Revision: https://reviews.llvm.org/D134943




More information about the All-commits mailing list