diff options
author | Aaron Ballman <aaron@aaronballman.com> | 2016-06-07 17:34:45 +0000 |
---|---|---|
committer | Aaron Ballman <aaron@aaronballman.com> | 2016-06-07 17:34:45 +0000 |
commit | 61f7b355550c794c3590182733a63790788c9429 (patch) | |
tree | dfa72182b0da2ad7f1aea681a9c24d03ec1ffcba /docs/LibASTMatchersReference.html | |
parent | 48e271ebb49eac1dd305a58d68c4d0d98a767aff (diff) |
Make isNoThrow and hasDynamicExceptionSpec polymorphic so they can be used with both functionDecl and functionPrototype matchers.
Patch by Don Hinton.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@272028 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'docs/LibASTMatchersReference.html')
-rw-r--r-- | docs/LibASTMatchersReference.html | 40 |
1 files changed, 36 insertions, 4 deletions
diff --git a/docs/LibASTMatchersReference.html b/docs/LibASTMatchersReference.html index b944fc6b7e..3606367d2f 100644 --- a/docs/LibASTMatchersReference.html +++ b/docs/LibASTMatchersReference.html @@ -2414,8 +2414,9 @@ Given: void j() throw(); void k() throw(int); void l() throw(...); -functionDecl(hasDynamicExceptionSpec()) - matches the declarations of j, k, and l, but not f, g, h, or i. +functionDecl(hasDynamicExceptionSpec()) and + functionProtoType(hasDynamicExceptionSpec()) + match the declarations of j, k, and l, but not f, g, h, or i. </pre></td></tr> @@ -2540,8 +2541,8 @@ Given: void h() throw(); void i() throw(int); void j() noexcept(false); -functionDecl(isNoThrow()) - matches the declarations of g, and h, but not f, i or j. +functionDecl(isNoThrow()) and functionProtoType(isNoThrow()) + match the declarations of g, and h, but not f, i or j. </pre></td></tr> @@ -2597,6 +2598,37 @@ functionProtoType(parameterCountIs(3)) </pre></td></tr> +<tr><td>Matcher<<a href="http://clang.llvm.org/doxygen/classclang_1_1FunctionProtoType.html">FunctionProtoType</a>></td><td class="name" onclick="toggle('hasDynamicExceptionSpec1')"><a name="hasDynamicExceptionSpec1Anchor">hasDynamicExceptionSpec</a></td><td></td></tr> +<tr><td colspan="4" class="doc" id="hasDynamicExceptionSpec1"><pre>Matches functions that have a dynamic exception specification. + +Given: + void f(); + void g() noexcept; + void h() noexcept(true); + void i() noexcept(false); + void j() throw(); + void k() throw(int); + void l() throw(...); +functionDecl(hasDynamicExceptionSpec()) and + functionProtoType(hasDynamicExceptionSpec()) + match the declarations of j, k, and l, but not f, g, h, or i. +</pre></td></tr> + + +<tr><td>Matcher<<a href="http://clang.llvm.org/doxygen/classclang_1_1FunctionProtoType.html">FunctionProtoType</a>></td><td class="name" onclick="toggle('isNoThrow1')"><a name="isNoThrow1Anchor">isNoThrow</a></td><td></td></tr> +<tr><td colspan="4" class="doc" id="isNoThrow1"><pre>Matches functions that have a non-throwing exception specification. + +Given: + void f(); + void g() noexcept; + void h() throw(); + void i() throw(int); + void j() noexcept(false); +functionDecl(isNoThrow()) and functionProtoType(isNoThrow()) + match the declarations of g, and h, but not f, i or j. +</pre></td></tr> + + <tr><td>Matcher<<a href="http://clang.llvm.org/doxygen/classclang_1_1FunctionProtoType.html">FunctionProtoType</a>></td><td class="name" onclick="toggle('parameterCountIs1')"><a name="parameterCountIs1Anchor">parameterCountIs</a></td><td>unsigned N</td></tr> <tr><td colspan="4" class="doc" id="parameterCountIs1"><pre>Matches FunctionDecls and FunctionProtoTypes that have a specific parameter count. |