summaryrefslogtreecommitdiffstats
path: root/clang/docs/LibASTMatchersReference.html
Commit message (Collapse)AuthorAgeFilesLines
...
* Updating the documentation for the hasAttr AST matcher, which behaves ↵Aaron Ballman2015-07-231-1/+2
| | | | | | somewhat differently when used within clang-query. Fixes PR24217. llvm-svn: 243029
* Something was unbalanced, and it wasn't the parentheses. ;-) Reverts r242915.Aaron Ballman2015-07-221-1/+1
| | | | llvm-svn: 242927
* Balancing parenthesis in comments and documentation; NFC.Aaron Ballman2015-07-221-1/+1
| | | | llvm-svn: 242915
* Add the ability to AST match a variable declaration that is an exception ↵Aaron Ballman2015-07-151-3/+15
| | | | | | variable. llvm-svn: 242303
* Implement an AST matcher for C++ exception catch handlers that can catch any ↵Aaron Ballman2015-07-021-0/+10
| | | | | | exception type (...). llvm-svn: 241256
* Add translationUnitDecl matcher.Samuel Benzaquen2015-02-101-31/+54
| | | | | | | | | | | | Summary: Add translationUnitDecl matcher. Reviewers: alexfh Subscribers: klimek, cfe-commits Differential Revision: http://reviews.llvm.org/D7512 llvm-svn: 228694
* Re-apply r222646 (was reverted in r222667). Adding 4 ASTMatchers: ↵Manuel Klimek2014-11-251-1/+146
| | | | | | | | | | | | | | | | | | | | | | | typedefDecl, isInMainFile, isInSystemFile, isInFileMatchingName Change to original: ifndef out tests in Windows due to /-separated paths. Summary: Often one is only interested in matches within the main-file or matches that are not within a system-header, for which this patch adds isInMainFile and isInSystemFile. They take no arguments and narrow down the matches. The isInFileMatchingName is mainly thought for interactive clang-query-sessions, to make a matcher more specific without restarting the session with the files you are interested in for that moment. It takes a string that will be used as regular-expression to match the filename of where the matched node is expanded. Patch by Hendrik von Prince. llvm-svn: 222765
* Reverting r222646; the tests do not pass on Windows. Also reverts r222664, ↵Aaron Ballman2014-11-241-146/+1
| | | | | | which was required for r222646 to compile with Visual Studio 2012. llvm-svn: 222667
* Adding 4 ASTMatchers: typedefDecl, isInMainFile, isInSystemFile, ↵Manuel Klimek2014-11-241-1/+146
| | | | | | | | | | | | | | | | | | | | isInFileMatchingName Summary: Often one is only interested in matches within the main-file or matches that are not within a system-header, for which this patch adds isInMainFile and isInSystemFile. They take no arguments and narrow down the matches. The isInFileMatchingName is mainly thought for interactive clang-query-sessions, to make a matcher more specific without restarting the session with the files you are interested in for that moment. It takes a string that will be used as regular-expression to match the filename of where the matched node is expanded. Patch by Hendrik von Prince. llvm-svn: 222646
* Implement various matchers around template argument handling.Manuel Klimek2014-10-091-0/+103
| | | | llvm-svn: 219408
* Add matcher for linkage specificationManuel Klimek2014-09-041-0/+10
| | | | | | Patch by Jacques Pienaar. llvm-svn: 217135
* Add hasAttr matcher for declarations.Manuel Klimek2014-08-251-21/+4
| | | | | | | | Delete special-case CUDA attribute matchers. Patch by Jacques Pienaar. llvm-svn: 216379
* Add isDeleted() matcher for FunctionDecl nodes.Samuel Benzaquen2014-08-151-1/+12
| | | | | | | | | | Reviewers: klimek Subscribers: klimek, cfe-commits Differential Revision: http://reviews.llvm.org/D4911 llvm-svn: 215714
* Adds AST matchers for matching CUDA declarations.Manuel Klimek2014-08-051-34/+78
| | | | | | Patch by Jacques Pienaar. llvm-svn: 214852
* Add hasLocalStorage/hasGlobalStorage matchers.Samuel Benzaquen2014-06-051-0/+25
| | | | | | | | | | | | | | Summary: Add hasLocalStorage/hasGlobalStorage matchers for VarDecl nodes. Update the doc. Also add them to the dynamic registry. Reviewers: klimek Subscribers: klimek, cfe-commits Differential Revision: http://reviews.llvm.org/D4034 llvm-svn: 210278
* Make equalsNode work with pointers to subtypes.Manuel Klimek2014-05-271-2/+2
| | | | llvm-svn: 209652
* Adds child traversal matchers for IfStmt's then and else branches.Manuel Klimek2014-05-271-0/+18
| | | | llvm-svn: 209649
* Allow hasBody on CXXForRangeStmt nodes and update the docs.Manuel Klimek2014-05-271-6/+38
| | | | llvm-svn: 209647
* Add loc() to the dynamic registry.Samuel Benzaquen2014-03-101-12/+12
| | | | | | | | | | | | | | | | | | Summary: Add loc() to the dynamic registry. Other fixes: - Fix the polymorphic variant value to accept an exact match, even if there are other possible conversions. - Fix specifiesTypeLoc() to not crash on an empty NestedNameSpecifierLoc. Reviewers: klimek CC: cfe-commits, klimek Differential Revision: http://llvm-reviews.chandlerc.com/D2928 llvm-svn: 203467
* Fix AST matcher documentation for overloaded matchers.Manuel Klimek2014-02-241-25/+96
| | | | | | | | Before this patch we would only use the fist occurance of a matcher function in the documentation, for example leaving out hasType(Matcher<QualType>). llvm-svn: 202019
* Fix docs generation for the AST matchers:Manuel Klimek2014-02-241-31/+73
| | | | | | | | | 1. Move internal functions into ASTMatchersInternal. 2. Adapt dump_ast_matchers.py to the new VariadicOperatorMatcherFunc signature. 3. Update the actual docs with the updated tool / code. llvm-svn: 202017
* Add partial support for the hasDeclaration() matcher in the dynamic layer.Samuel Benzaquen2013-11-181-29/+247
| | | | | | | | | | | | | | Summary: Add partial support for the hasDeclaration() matcher in the dynamic layer. This matcher has some special logic to allow any type that has a getDecl() method. We do not support this right now. Reviewers: klimek CC: cfe-commits, revane Differential Revision: http://llvm-reviews.chandlerc.com/D1889 llvm-svn: 195013
* Fix constructor-related typos.Benjamin Kramer2013-09-091-1/+1
| | | | | | Noticed by Roman Divacky. llvm-svn: 190311
* Rewrite eachOf/allOf/anyOf to use a variadic operator.Samuel Benzaquen2013-08-271-18/+18
| | | | | | | | | | | | | | Summary: Rewrite eachOf/allOf/anyOf to use a variadic operator, instead of hand-written calls to Polymorphic matchers. This simplifies their definition and future changes to add them to the dynamic registry. Reviewers: klimek CC: cfe-commits, revane Differential Revision: http://llvm-reviews.chandlerc.com/D1427 llvm-svn: 189357
* Refactor ArgumentAdaptativeMatcher matchers to remove the template from ↵Samuel Benzaquen2013-08-161-10/+18
| | | | | | | | | | | | | | | | their declaration. Summary: Refactor ArgumentAdaptativeMatcher matchers to remove the template from their declaration. This facilitates dynamic registration. Change the registry code to use the regular overload resolution mechanism for adaptative matchers. Reviewers: klimek CC: cfe-commits, revane Differential Revision: http://llvm-reviews.chandlerc.com/D1402 llvm-svn: 188560
* Fix incorrect documentation generation for type matchers.Manuel Klimek2013-07-251-284/+0
| | | | llvm-svn: 187104
* Update docs.Manuel Klimek2013-07-241-8/+81
| | | | llvm-svn: 187022
* Add support for type traversal matchers.Samuel Benzaquen2013-07-151-24/+24
| | | | | | | | | | | | | | | Summary: Fixup the type traversal macros/matchers to specify the supported types. Make the marshallers a little more generic to support any variadic function. Update the doc script. Reviewers: klimek CC: cfe-commits, revane Differential Revision: http://llvm-reviews.chandlerc.com/D1023 llvm-svn: 186340
* Add support for polymorphic matchers. Use runtime type checking to determine ↵Samuel Benzaquen2013-06-211-0/+38
| | | | | | the right polymorphic overload to use. llvm-svn: 184558
* Improve documentation for AST matchers.Manuel Klimek2013-06-211-0/+23
| | | | llvm-svn: 184538
* Adds the equalsBoundNode matcher.Manuel Klimek2013-06-201-0/+92
| | | | | | Most of the tests contributed by Edwin Vane. llvm-svn: 184427
* Implements declaratorDecl, parmVarDecl and hassTypeLoc matchers.Manuel Klimek2013-06-201-0/+37
| | | | llvm-svn: 184419
* Fixes the comment for hasDeclaration.Manuel Klimek2013-06-101-31/+117
| | | | llvm-svn: 183640
* Adding isConst() ASTMatcher for CXXMethodDecl nodesEdwin Vane2013-05-091-0/+13
| | | | | | Updated reference and unit tests. llvm-svn: 181522
* Updating LibASTMatchersReference to include namespaceDecl()Edwin Vane2013-05-091-0/+11
| | | | | | The namespaceDecl() ASTMatcher was added in r179027. llvm-svn: 181519
* Adding new AST Matchers isVirtual and isOverrideEdwin Vane2013-04-091-0/+28
| | | | | | | | isVirtual - matches CXXMethodDecl nodes for virtual methods isOverride - matches CXXMethodDecl nodes for methods that override virtual methods from a base class. Author: Philip Dunstan <phil@philipdunstan.com> llvm-svn: 179126
* Adding a hasLocalQualifiers() AST Matcher.Edwin Vane2013-04-021-0/+15
| | | | | | Updated tests and docs. llvm-svn: 178556
* Adding parenType() and innerType() AST MatchersEdwin Vane2013-04-011-0/+38
| | | | | | Updated docs and tests. llvm-svn: 178487
* Updating LibASTMatchersReferenceEdwin Vane2013-03-281-40/+40
| | | | | | | The generator for LibASTMatchersReference.html didn't get run last time ASTMatchers changes were made. Here are up-to-date docs. llvm-svn: 178234
* Adding lvalue and rvalue reference type matchersEdwin Vane2013-03-071-8/+84
| | | | | | | | Updated docs and tests. Reviewers: klimek, gribozavr llvm-svn: 176630
* New ASTMatchers and enhancement to hasOverloadedOperatorNameEdwin Vane2013-03-061-7/+58
| | | | | | | | | | | | | | | Added two new narrowing matchers: * hasMethod: aplies a matcher to a CXXRecordDecl's methods until a match is made or there are no more methods. * hasCanonicalType: applies a matcher to a QualType's canonicalType. Enhanced hasOverloadedOperatorName to work on CXXMethodDecl as well as CXXOperatorCallExpr. Updated tests and docs. Reviewers: klimek, gribozavr llvm-svn: 176556
* hasQualifer() matcher should return false if there's no qualifierEdwin Vane2013-03-041-1/+1
| | | | | | | | Instead of passing NULL on to sub-matcher, just return false. Updated tests and regenerated docs. Author: Tareq A Siraj <tareq.a.siraj@intel.com> llvm-svn: 176441
* Various additions to ASTMatcher library:Edwin Vane2013-02-251-0/+120
| | | | | | | | | | | | | | | | New type matchers: * recordType * elaboratedType New narrowing matchers: * hasQualifier * namesType * hasDeclContext Added tests and updated LibASTMatchersReference. Reviewers: klimek llvm-svn: 176047
* Adding hasDeclaration overload for TemplateSpecializationTypeEdwin Vane2013-02-251-15/+64
| | | | | | | | | | | | | | TemplateSpecializationType doesn't quite have getDecl(). Need to go through TemplateName to get a TemplateDecl. Added test cases for the hasDeclaration() overload for TemplateSpecializationType. Also introduced the type matcher templateSpecializationType() used by the new hasDeclaration() test case. Updated LibASTMatchersReference. Reviewers: klimek llvm-svn: 176025
* Update generated documentation after recent matcher addition.Daniel Jasper2013-02-251-0/+55
| | | | llvm-svn: 176018
* Support in hasDeclaration for types with getDecl()Edwin Vane2013-02-191-15/+38
| | | | | | | | | | | | Using a new metafunction for detecting the presence of the member 'getDecl' in a type T, added support to hasDeclaration for any such type T. This allows hasDecl() to be replaced and enables several other subclasses of clang::Type to use hasDeclaration. Updated unittests and LibASTMatchersReference.html. Reviewers: klimek llvm-svn: 175532
* Implements equalsNode for Decl and Stmt.Manuel Klimek2013-02-071-0/+15
| | | | | | | | | This is a powerful tool when doing iterative refined matches, where another match is started inside the match callback of the first one; this allows for example to find out whether the node was in the condition or body of its parent if-statement. llvm-svn: 174605
* Cleanup of ASTMatcher macros and adding support for overloaded matchers.Manuel Klimek2013-02-061-14/+22
| | | | | | | | | | This is in preparation for adding other overloaded matchers. This change alone is a net win in LOC. I went through all matchers and looked whether we could now encode them as macro, or simplify them with the matcher atoms that were not available before. llvm-svn: 174540
* Implements the convenience matcher findAll.Manuel Klimek2013-02-041-0/+34
| | | | | | | | | | | We found that findAll has been implemented incorrectly multiple times by various people using the matchers. To prevent further wasted development effort, it makes sense to add it as convenience matcher implemented as eachOf(m, forEachDescendant(m)). This patch also updates the docs with the new matchers. llvm-svn: 174320
* Fixes dump_ast_matchers to parse all matcher macros and updates theManuel Klimek2013-01-091-2/+617
| | | | | | docs. llvm-svn: 171962
OpenPOWER on IntegriCloud