[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
Tue Jun 4 13:29:21 PDT 2024
================
@@ -176,11 +176,13 @@ inline internal::TrueMatcher anything() { return internal::TrueMatcher(); }
/// \code
/// int X;
/// namespace NS {
-/// int Y;
+/// int Y;
/// } // namespace NS
/// \endcode
-/// decl(hasDeclContext(translationUnitDecl()))
-/// matches "int X", but not "int Y".
+/// \compile_args{-std=c++}
+/// The matcher \matcher{namedDecl(hasDeclContext(translationUnitDecl()))}
+/// matches \match{type=name$X} and \match{type=name$NS},
----------------
AaronBallman wrote:
Under what circumstances do you need to use this special `type=name$foo` syntax?
https://github.com/llvm/llvm-project/pull/94248
More information about the llvm-branch-commits
mailing list