Patch by Jonathan Coe.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@258628
91177308-0d34-0410-b5e6-
96231b3b80d8
operator.
Given
- struct S {
- S(const S &); #1
- S& operator=(S &&); #2
- };
-cxxMethodDecl(isMoveAssignmentOperator()) will match #2, but not #1.
+struct A {
+ A &operator=(const A &);
+ A &operator=(A &&);
+};
+
+cxxMethodDecl(isMoveAssignmentOperator()) matches the second method but not
+the first one.
</pre></td></tr>
///
/// Given
/// \code
-/// struct S {
-/// S(const S &); // #1
-/// S& operator=(S &&); // #2
-/// };
+/// struct A {
+/// A &operator=(const A &);
+/// A &operator=(A &&);
+/// };
/// \endcode
-/// cxxMethodDecl(isMoveAssignmentOperator()) will match #2, but not #1.
+///
+/// cxxMethodDecl(isMoveAssignmentOperator()) matches the second method but not
+/// the first one.
AST_MATCHER(CXXMethodDecl, isMoveAssignmentOperator) {
return Node.isMoveAssignmentOperator();
}