[all-commits] [llvm/llvm-project] 3c75fe: [clang] Compare constraints before diagnosing mism...

Roy Jacobson via All-commits all-commits at lists.llvm.org
Tue Nov 29 04:57:40 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 3c75feab3bbda563374f08e46a7c052c0c6f1c36
      https://github.com/llvm/llvm-project/commit/3c75feab3bbda563374f08e46a7c052c0c6f1c36
  Author: Roy Jacobson <roi.jacobson1 at gmail.com>
  Date:   2022-11-29 (Tue, 29 Nov 2022)

  Changed paths:
    M clang/lib/Sema/SemaOverload.cpp
    M clang/test/CXX/over/over.load/p2-0x.cpp

  Log Message:
  -----------
  [clang] Compare constraints before diagnosing mismatched ref qualifiers (GH58962)

As noticed in GH58962, we should only diagnose illegal overloads of member functions
when the ref qualifiers don't match if the trailing constraints are the same.

The fix is to move the existing constraints check earlier in Sema::IsOverload.

Closes https://github.com/llvm/llvm-project/issues/58962

Reviewed By: erichkeane

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




More information about the All-commits mailing list