summaryrefslogtreecommitdiffstats
path: root/clang/docs/LibASTMatchersReference.html
diff options
context:
space:
mode:
authorDmitri Gribenko <gribozavr@gmail.com>2019-05-03 12:50:00 +0000
committerDmitri Gribenko <gribozavr@gmail.com>2019-05-03 12:50:00 +0000
commitb641b914a36bbf1f35587b9f0bf652d691f97cee (patch)
tree3a7e4ed5002fce854d7d1036f9f90093edbb0246 /clang/docs/LibASTMatchersReference.html
parent6d08b8dbaef2a6795d76b617a88070ec9c815a2e (diff)
downloadbcm5719-llvm-b641b914a36bbf1f35587b9f0bf652d691f97cee.tar.gz
bcm5719-llvm-b641b914a36bbf1f35587b9f0bf652d691f97cee.zip
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 llvm-svn: 359876
Diffstat (limited to 'clang/docs/LibASTMatchersReference.html')
-rw-r--r--clang/docs/LibASTMatchersReference.html23
1 files changed, 23 insertions, 0 deletions
diff --git a/clang/docs/LibASTMatchersReference.html b/clang/docs/LibASTMatchersReference.html
index f0e965568da..a053bd1bb5f 100644
--- a/clang/docs/LibASTMatchersReference.html
+++ b/clang/docs/LibASTMatchersReference.html
@@ -2827,6 +2827,29 @@ by the compiler (eg. implicit default/copy constructors).
</pre></td></tr>
+<tr><td>Matcher&lt;<a href="https://clang.llvm.org/doxygen/classclang_1_1Decl.html">Decl</a>&gt;</td><td class="name" onclick="toggle('isInStdNamespace0')"><a name="isInStdNamespace0Anchor">isInStdNamespace</a></td><td></td></tr>
+<tr><td colspan="4" class="doc" id="isInStdNamespace0"><pre>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.
+</pre></td></tr>
+
+
<tr><td>Matcher&lt;<a href="https://clang.llvm.org/doxygen/classclang_1_1Decl.html">Decl</a>&gt;</td><td class="name" onclick="toggle('isPrivate0')"><a name="isPrivate0Anchor">isPrivate</a></td><td></td></tr>
<tr><td colspan="4" class="doc" id="isPrivate0"><pre>Matches private C++ declarations.
OpenPOWER on IntegriCloud