| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
| |
llvm-svn: 209652
|
| |
|
|
| |
llvm-svn: 209649
|
| |
|
|
| |
llvm-svn: 209647
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
| |
Noticed by Roman Divacky.
llvm-svn: 190311
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
| |
llvm-svn: 187104
|
| |
|
|
| |
llvm-svn: 187022
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
| |
the right polymorphic overload to use.
llvm-svn: 184558
|
| |
|
|
| |
llvm-svn: 184538
|
| |
|
|
|
|
| |
Most of the tests contributed by Edwin Vane.
llvm-svn: 184427
|
| |
|
|
| |
llvm-svn: 184419
|
| |
|
|
| |
llvm-svn: 183640
|
| |
|
|
|
|
| |
Updated reference and unit tests.
llvm-svn: 181522
|
| |
|
|
|
|
| |
The namespaceDecl() ASTMatcher was added in r179027.
llvm-svn: 181519
|
| |
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
| |
Updated tests and docs.
llvm-svn: 178556
|
| |
|
|
|
|
| |
Updated docs and tests.
llvm-svn: 178487
|
| |
|
|
|
|
|
| |
The generator for LibASTMatchersReference.html didn't get run last time
ASTMatchers changes were made. Here are up-to-date docs.
llvm-svn: 178234
|
| |
|
|
|
|
|
|
| |
Updated docs and tests.
Reviewers: klimek, gribozavr
llvm-svn: 176630
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
New type matchers:
* recordType
* elaboratedType
New narrowing matchers:
* hasQualifier
* namesType
* hasDeclContext
Added tests and updated LibASTMatchersReference.
Reviewers: klimek
llvm-svn: 176047
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
| |
llvm-svn: 176018
|
| |
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
| |
docs.
llvm-svn: 171962
|
| |
|
|
|
|
|
| |
We still need to make the python script understand some of the new
matchers, but this should be an improvement.
llvm-svn: 169258
|
| |
|
|
|
|
|
|
| |
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
|
| |
|
|
| |
llvm-svn: 162650
|
|
|
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
|