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 | 230ad971565c413419b4fd2f0d44a3856d9bb705 (patch) | |
tree | e8e7c0a11b34fc7afe2d88ea83ad731bd6504ba6 /clang/docs/LibASTMatchersReference.html | |
parent | 4c4bdba28a06bd2fb3d246b6b7bb1a6300fa07de (diff) | |
download | bcm5719-llvm-230ad971565c413419b4fd2f0d44a3856d9bb705.tar.gz bcm5719-llvm-230ad971565c413419b4fd2f0d44a3856d9bb705.zip |
Make isNoThrow and hasDynamicExceptionSpec polymorphic so they can be used with both functionDecl and functionPrototype matchers.
Patch by Don Hinton.
llvm-svn: 272028
Diffstat (limited to 'clang/docs/LibASTMatchersReference.html')
-rw-r--r-- | clang/docs/LibASTMatchersReference.html | 40 |
1 files changed, 36 insertions, 4 deletions
diff --git a/clang/docs/LibASTMatchersReference.html b/clang/docs/LibASTMatchersReference.html index b944fc6b7e9..3606367d2fd 100644 --- a/clang/docs/LibASTMatchersReference.html +++ b/clang/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. |