Author: aaronballman Date: Sat Jan 23 11:49:18 2016 New Revision: 258628 URL: http://llvm.org/viewvc/llvm-project?rev=258628&view=rev Log: Improving documentation for the isMoveAssignmentOperator AST matcher.
Patch by Jonathan Coe. Modified: cfe/trunk/docs/LibASTMatchersReference.html cfe/trunk/include/clang/ASTMatchers/ASTMatchers.h Modified: cfe/trunk/docs/LibASTMatchersReference.html URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/docs/LibASTMatchersReference.html?rev=258628&r1=258627&r2=258628&view=diff ============================================================================== --- cfe/trunk/docs/LibASTMatchersReference.html (original) +++ cfe/trunk/docs/LibASTMatchersReference.html Sat Jan 23 11:49:18 2016 @@ -1820,11 +1820,13 @@ matches A and C::f, but not B, C, or B:: 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> Modified: cfe/trunk/include/clang/ASTMatchers/ASTMatchers.h URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/ASTMatchers/ASTMatchers.h?rev=258628&r1=258627&r2=258628&view=diff ============================================================================== --- cfe/trunk/include/clang/ASTMatchers/ASTMatchers.h (original) +++ cfe/trunk/include/clang/ASTMatchers/ASTMatchers.h Sat Jan 23 11:49:18 2016 @@ -3581,12 +3581,14 @@ AST_MATCHER(CXXMethodDecl, isCopyAssignm /// /// 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(); } _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits