summaryrefslogtreecommitdiffstats
path: root/clang/docs/LibASTMatchersReference.html
Commit message (Collapse)AuthorAgeFilesLines
* 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
* Update matcher documentation with script.Daniel Jasper2012-12-041-154/+449
| | | | | | | We still need to make the python script understand some of the new matchers, but this should be an improvement. llvm-svn: 169258
* Introduces anchors into LibASTMatchersReference.html.Manuel Klimek2012-09-071-158/+183
| | | | | | | | This allows linking to LibASTMatchersRefernce.html#<matcher><N>Anchor to link to the N'the declaration of a matcher and automatically expand its documentation. llvm-svn: 163386
* Update reference docs to latest changes.Manuel Klimek2012-08-261-163/+177
| | | | llvm-svn: 162650
* Adds the most requested doc for the AST matchers: a referenceManuel Klimek2012-08-201-0/+1899
of matchers, categorized by type and fully expanded for the context in which they can be used. I used a script to generate this documentation which I'll want to be scrunitized by a code review before checking it in. llvm-svn: 162225
OpenPOWER on IntegriCloud