summaryrefslogtreecommitdiffstats
path: root/clang/docs/LibASTMatchersReference.html
diff options
context:
space:
mode:
authorManuel Klimek <klimek@google.com>2014-08-25 11:23:50 +0000
committerManuel Klimek <klimek@google.com>2014-08-25 11:23:50 +0000
commit3fe8a38110ee54efe04c3a66c677c67fb619f645 (patch)
treecbac75bd4d175a295a59863852e9d3c451d686a9 /clang/docs/LibASTMatchersReference.html
parent4b3ba214d06d5681894d1f481a7bb1f5cc6a597e (diff)
downloadbcm5719-llvm-3fe8a38110ee54efe04c3a66c677c67fb619f645.tar.gz
bcm5719-llvm-3fe8a38110ee54efe04c3a66c677c67fb619f645.zip
Add hasAttr matcher for declarations.
Delete special-case CUDA attribute matchers. Patch by Jacques Pienaar. llvm-svn: 216379
Diffstat (limited to 'clang/docs/LibASTMatchersReference.html')
-rw-r--r--clang/docs/LibASTMatchersReference.html25
1 files changed, 4 insertions, 21 deletions
diff --git a/clang/docs/LibASTMatchersReference.html b/clang/docs/LibASTMatchersReference.html
index 03910f0f665..1a494e6aea4 100644
--- a/clang/docs/LibASTMatchersReference.html
+++ b/clang/docs/LibASTMatchersReference.html
@@ -1612,30 +1612,13 @@ and reference to that variable declaration within a compound statement.
</pre></td></tr>
-<tr><td>Matcher&lt<a href="http://clang.llvm.org/doxygen/classclang_1_1Decl.html">Decl</a>&gt;</td><td class="name" onclick="toggle('hasCudaDeviceAttr0')"><a name="hasCudaDeviceAttr0Anchor">hasCudaDeviceAttr</a></td><td></td></tr>
-<tr><td colspan="4" class="doc" id="hasCudaDeviceAttr0"><pre>Matches declaration that has CUDA device attribute.
+<tr><td>Matcher&lt<a href="http://clang.llvm.org/doxygen/classclang_1_1Decl.html">Decl</a>&gt;</td><td class="name" onclick="toggle('hasAttr0')"><a name="hasAttr0Anchor">hasAttr</a></td><td>attr::Kind AttrKind</td></tr>
+<tr><td colspan="4" class="doc" id="hasAttr0"><pre>Matches declaration that has a given attribute.
Given
__attribute__((device)) void f() { ... }
-matches the function declaration of f.
-</pre></td></tr>
-
-
-<tr><td>Matcher&lt<a href="http://clang.llvm.org/doxygen/classclang_1_1Decl.html">Decl</a>&gt;</td><td class="name" onclick="toggle('hasCudaGlobalAttr0')"><a name="hasCudaGlobalAttr0Anchor">hasCudaGlobalAttr</a></td><td></td></tr>
-<tr><td colspan="4" class="doc" id="hasCudaGlobalAttr0"><pre>Matches declaration that has CUDA global attribute.
-
-Given
- __attribute__((global)) void f() { ... }
-matches the function declaration of f.
-</pre></td></tr>
-
-
-<tr><td>Matcher&lt<a href="http://clang.llvm.org/doxygen/classclang_1_1Decl.html">Decl</a>&gt;</td><td class="name" onclick="toggle('hasCudaHostAttr0')"><a name="hasCudaHostAttr0Anchor">hasCudaHostAttr</a></td><td></td></tr>
-<tr><td colspan="4" class="doc" id="hasCudaHostAttr0"><pre>Matches declaration that has CUDA host attribute.
-
-Given
- __attribute__((host)) void f() { ... }
-matches the function declaration of f.
+decl(hasAttr(clang::attr::CUDADevice)) matches the function declaration of
+f.
</pre></td></tr>
OpenPOWER on IntegriCloud