llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT--> @llvm/pr-subscribers-clang Author: Mikhnenko Sasha (4JustMe4) <details> <summary>Changes</summary> [Here](https://github.com/llvm/llvm-project/blob/6a98c4a1602591c942f01dceb3aa29ffd4cf1e5b/clang/include/clang/ASTMatchers/ASTMatchers.h#L4188-L4203) and [here](https://github.com/llvm/llvm-project/blob/6a98c4a1602591c942f01dceb3aa29ffd4cf1e5b/clang/include/clang/ASTMatchers/ASTMatchers.h#L3679-L3695) we can see similar code samples and same examples: ``` cxxMemberCallExpr(on(callExpr())) ``` In the first case, it is [written](https://github.com/llvm/llvm-project/blob/6a98c4a1602591c942f01dceb3aa29ffd4cf1e5b/clang/include/clang/ASTMatchers/ASTMatchers.h#L4201) that the object must not be matched: ``` /// cxxMemberCallExpr(on(callExpr())) /// does not match `(g()).m()`, because the parens are not ignored. ``` In the second case, it is [written](https://github.com/llvm/llvm-project/blob/6a98c4a1602591c942f01dceb3aa29ffd4cf1e5b/clang/include/clang/ASTMatchers/ASTMatchers.h#L3693) that the object must be matched: ``` /// cxxMemberCallExpr(on(callExpr())) /// matches `(g()).m()`. ``` I think that parens are ignored --- Full diff: https://github.com/llvm/llvm-project/pull/112190.diff 1 Files Affected: - (modified) clang/include/clang/ASTMatchers/ASTMatchers.h (+1-1) ``````````diff 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, `````````` </details> https://github.com/llvm/llvm-project/pull/112190 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits