[llvm-branch-commits] [clang] [clang][test] add testing for the AST matcher reference (PR #94248)
Aaron Ballman via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Wed Jun 5 05:56:23 PDT 2024
================
@@ -330,35 +377,46 @@ AST_POLYMORPHIC_MATCHER_P(isExpandedFromMacro,
/// Matches declarations.
///
-/// Examples matches \c X, \c C, and the friend declaration inside \c C;
+/// Given
/// \code
/// void X();
/// class C {
-/// friend X;
+/// friend void X();
/// };
/// \endcode
+/// \compile_args{-std=c++}
+/// The matcher \matcher{decl()}
+/// matches \match{void X()}, \match{type=name;count=2$C}
+/// and \match{count=2$friend void X()}.
----------------
AaronBallman wrote:
okay, thank you! I kind of figured it was the implicit class declaration.
https://github.com/llvm/llvm-project/pull/94248
More information about the llvm-branch-commits
mailing list