summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--clang/docs/LibASTMatchersReference.html12
-rw-r--r--clang/include/clang/ASTMatchers/ASTMatchers.h12
2 files changed, 14 insertions, 10 deletions
diff --git a/clang/docs/LibASTMatchersReference.html b/clang/docs/LibASTMatchersReference.html
index 2bb6915e92d..75deea40e13 100644
--- a/clang/docs/LibASTMatchersReference.html
+++ b/clang/docs/LibASTMatchersReference.html
@@ -1820,11 +1820,13 @@ matches A and C::f, but not B, C, or B::f
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>
diff --git a/clang/include/clang/ASTMatchers/ASTMatchers.h b/clang/include/clang/ASTMatchers/ASTMatchers.h
index fda07de7572..c74b4bce9d0 100644
--- a/clang/include/clang/ASTMatchers/ASTMatchers.h
+++ b/clang/include/clang/ASTMatchers/ASTMatchers.h
@@ -3581,12 +3581,14 @@ AST_MATCHER(CXXMethodDecl, isCopyAssignmentOperator) {
///
/// 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();
}
OpenPOWER on IntegriCloud