[Clang] Modify CXXMethodDecl::isMoveAssignmentOperator() to look through type sugar
authorShafik Yaghmour <shafik.yaghmour@intel.com>
Thu, 14 Jul 2022 21:54:48 +0000 (14:54 -0700)
committerShafik Yaghmour <shafik.yaghmour@intel.com>
Thu, 14 Jul 2022 23:09:52 +0000 (16:09 -0700)
commit80dec2ecfffe30f86ecfeec8f553b16bb992c48b
treee534d16411ef27f93c1d2720465cd7a0bbb3a9a6
parent9913ea490ae8d3e15ea1ee16a7f5b80ad87fbced
[Clang] Modify CXXMethodDecl::isMoveAssignmentOperator() to look through type sugar
AcceptedPublic

Currently CXXMethodDecl::isMoveAssignmentOperator() does not look though type
sugar and so if the parameter is a type alias it will not be able to detect
that the method is a move assignment operator. This PR fixes that and adds a set
of tests that covers that we correctly detect special member functions when
defaulting or deleting them.

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

Differential Revision: https://reviews.llvm.org/D129591
clang/docs/ReleaseNotes.rst
clang/lib/AST/DeclCXX.cpp
clang/test/SemaCXX/cxx0x-defaulted-functions.cpp