diff options
author | Manuel Klimek <klimek@google.com> | 2014-08-25 11:23:50 +0000 |
---|---|---|
committer | Manuel Klimek <klimek@google.com> | 2014-08-25 11:23:50 +0000 |
commit | 3fe8a38110ee54efe04c3a66c677c67fb619f645 (patch) | |
tree | cbac75bd4d175a295a59863852e9d3c451d686a9 /clang/docs/LibASTMatchersReference.html | |
parent | 4b3ba214d06d5681894d1f481a7bb1f5cc6a597e (diff) | |
download | bcm5719-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.html | 25 |
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<<a href="http://clang.llvm.org/doxygen/classclang_1_1Decl.html">Decl</a>></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<<a href="http://clang.llvm.org/doxygen/classclang_1_1Decl.html">Decl</a>></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<<a href="http://clang.llvm.org/doxygen/classclang_1_1Decl.html">Decl</a>></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<<a href="http://clang.llvm.org/doxygen/classclang_1_1Decl.html">Decl</a>></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> |