From 54eb12a115eb4fbdc59b1335d721d0415ca1f7a8 Mon Sep 17 00:00:00 2001 From: Dmitri Gribenko Date: Fri, 3 May 2019 12:50:00 +0000 Subject: Added an AST matcher for declarations that are in the `std` namespace Reviewers: alexfh Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D61480 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@359876 91177308-0d34-0410-b5e6-96231b3b80d8 --- docs/LibASTMatchersReference.html | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'docs/LibASTMatchersReference.html') diff --git a/docs/LibASTMatchersReference.html b/docs/LibASTMatchersReference.html index f0e965568d..a053bd1bb5 100644 --- a/docs/LibASTMatchersReference.html +++ b/docs/LibASTMatchersReference.html @@ -2827,6 +2827,29 @@ by the compiler (eg. implicit default/copy constructors). +Matcher<Decl>isInStdNamespace +
Matches declarations in the namespace `std`, but not in nested namespaces.
+
+Given
+  class vector {};
+  namespace foo {
+    class vector {};
+    namespace std {
+      class vector {};
+    }
+  }
+  namespace std {
+    inline namespace __1 {
+      class vector {}; // #1
+      namespace experimental {
+        class vector {};
+      }
+    }
+  }
+cxxRecordDecl(hasName("vector"), isInStdNamespace()) will match only #1.
+
+ + Matcher<Decl>isPrivate
Matches private C++ declarations.
 
-- 
cgit v1.2.1