[PATCH] D138749: [clang] Compare constraints before diagnosing mismatched ref qualifiers (GH58962)

Roy Jacobson via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sat Nov 26 15:01:59 PST 2022


royjacobson created this revision.
Herald added a project: All.
royjacobson requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.

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.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D138749

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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D138749.478070.patch
Type: text/x-patch
Size: 4368 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20221126/2f427ad9/attachment.bin>


More information about the cfe-commits mailing list