[clang] Different info in docs in AST methods (PR #112190)

Mikhnenko Sasha via cfe-commits cfe-commits at lists.llvm.org
Tue Oct 15 13:14:59 PDT 2024


https://github.com/4JustMe4 updated https://github.com/llvm/llvm-project/pull/112190

>From 4cd2e269cec8eb0c0bc31c10ecef4979645e32f1 Mon Sep 17 00:00:00 2001
From: mikhnenko <mikhnenko at yandex-team.com>
Date: Mon, 14 Oct 2024 15:29:16 +0300
Subject: [PATCH 1/3] Fix different info

---
 clang/include/clang/ASTMatchers/ASTMatchers.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/clang/include/clang/ASTMatchers/ASTMatchers.h b/clang/include/clang/ASTMatchers/ASTMatchers.h
index f1c72efc238784..6c8d900927f2d4 100644
--- a/clang/include/clang/ASTMatchers/ASTMatchers.h
+++ b/clang/include/clang/ASTMatchers/ASTMatchers.h
@@ -4199,7 +4199,7 @@ AST_MATCHER_P_OVERLOAD(QualType, references, internal::Matcher<Decl>,
 ///     cxxRecordDecl(hasName("Y")))))
 ///   matches `y.m()`, `x.m()` and (g()).m(), but not `x.g()`.
 /// cxxMemberCallExpr(on(callExpr()))
-///   does not match `(g()).m()`, because the parens are not ignored.
+///   does match `(g()).m()`, because the parens are ignored.
 ///
 /// FIXME: Overload to allow directly matching types?
 AST_MATCHER_P(CXXMemberCallExpr, onImplicitObjectArgument,

>From 509b6bd23117dfd0039614c7d97ae0054c9c772e Mon Sep 17 00:00:00 2001
From: Mikhnenko Sasha <78651190+4JustMe4 at users.noreply.github.com>
Date: Tue, 15 Oct 2024 23:12:09 +0300
Subject: [PATCH 2/3] Apply suggestions from code review

Co-authored-by: Aaron Ballman <aaron at aaronballman.com>
---
 clang/include/clang/ASTMatchers/ASTMatchers.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/clang/include/clang/ASTMatchers/ASTMatchers.h b/clang/include/clang/ASTMatchers/ASTMatchers.h
index 6c8d900927f2d4..54e484d41fb1c3 100644
--- a/clang/include/clang/ASTMatchers/ASTMatchers.h
+++ b/clang/include/clang/ASTMatchers/ASTMatchers.h
@@ -4197,9 +4197,9 @@ AST_MATCHER_P_OVERLOAD(QualType, references, internal::Matcher<Decl>,
 /// \endcode
 /// cxxMemberCallExpr(onImplicitObjectArgument(hasType(
 ///     cxxRecordDecl(hasName("Y")))))
-///   matches `y.m()`, `x.m()` and (g()).m(), but not `x.g()`.
+///   matches `y.m()`, `x.m()` and (`g()).m()`, but not `x.g()`).
 /// cxxMemberCallExpr(on(callExpr()))
-///   does match `(g()).m()`, because the parens are ignored.
+///   only matches `(g()).m()` (the parens are ignored).
 ///
 /// FIXME: Overload to allow directly matching types?
 AST_MATCHER_P(CXXMemberCallExpr, onImplicitObjectArgument,

>From f88fb96cf3ffb4e06a95649ab08524b3e687d60b Mon Sep 17 00:00:00 2001
From: mikhnenko <mikhnenko at yandex-team.com>
Date: Tue, 15 Oct 2024 23:14:32 +0300
Subject: [PATCH 3/3] Regenerate docs

---
 clang/docs/LibASTMatchersReference.html | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/clang/docs/LibASTMatchersReference.html b/clang/docs/LibASTMatchersReference.html
index a16b9c44ef0eab..c6307954d7f1bb 100644
--- a/clang/docs/LibASTMatchersReference.html
+++ b/clang/docs/LibASTMatchersReference.html
@@ -7239,9 +7239,9 @@ <h2 id="traversal-matchers">AST Traversal Matchers</h2>
   void z(Y y, X x) { y.m(); x.m(); x.g(); (g()).m(); }
 cxxMemberCallExpr(onImplicitObjectArgument(hasType(
     cxxRecordDecl(hasName("Y")))))
-  matches `y.m()`, `x.m()` and (g()).m(), but not `x.g()`.
+  matches `y.m()`, `x.m()` and (`g()).m()`, but not `x.g()`).
 cxxMemberCallExpr(on(callExpr()))
-  does not match `(g()).m()`, because the parens are not ignored.
+  only matches `(g()).m()` (the parens are ignored).
 
 FIXME: Overload to allow directly matching types?
 </pre></td></tr>



More information about the cfe-commits mailing list