[all-commits] [llvm/llvm-project] 933026: Use the correct namespace for looking up matching ...

Utkarsh Saxena via All-commits all-commits at lists.llvm.org
Mon Oct 23 05:10:21 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 9330261143ccbe947ef0687fd20747ba47f26879
      https://github.com/llvm/llvm-project/commit/9330261143ccbe947ef0687fd20747ba47f26879
  Author: Utkarsh Saxena <usaxena95 at gmail.com>
  Date:   2023-10-23 (Mon, 23 Oct 2023)

  Changed paths:
    M clang/docs/ReleaseNotes.rst
    M clang/lib/Sema/SemaOverload.cpp
    A clang/test/CXX/over/over.match/over.match.funcs/over.match.oper/p2468R2.cppm
    M clang/test/CXX/over/over.match/over.match.funcs/over.match.oper/p3-2a.cpp

  Log Message:
  -----------
  Use the correct namespace for looking up matching operator!= (#68922)

`S.getScopeForContext` determins the **active** scope associated with
the given `declContext`.
This fails to find the matching `operator!=` if candidate `operator==`
was found via ADL since that scope is not active.

Instead, just directly lookup using the namespace decl of `operator==`

Fixes #68901




More information about the All-commits mailing list