| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
| |
somewhat differently when used within clang-query. Fixes PR24217.
llvm-svn: 243029
|
|
|
|
| |
llvm-svn: 242927
|
|
|
|
| |
llvm-svn: 242915
|
|
|
|
|
|
| |
variable.
llvm-svn: 242303
|
|
|
|
|
|
| |
exception type (...).
llvm-svn: 241256
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary: Add translationUnitDecl matcher.
Reviewers: alexfh
Subscribers: klimek, cfe-commits
Differential Revision: http://reviews.llvm.org/D7512
llvm-svn: 228694
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
which was required for r222646 to compile with Visual Studio 2012.
llvm-svn: 222667
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
llvm-svn: 219408
|
|
|
|
|
|
| |
Patch by Jacques Pienaar.
llvm-svn: 217135
|
|
|
|
|
|
|
|
| |
Delete special-case CUDA attribute matchers.
Patch by Jacques Pienaar.
llvm-svn: 216379
|
|
|
|
|
|
|
|
|
|
| |
Reviewers: klimek
Subscribers: klimek, cfe-commits
Differential Revision: http://reviews.llvm.org/D4911
llvm-svn: 215714
|
|
|
|
|
|
| |
Patch by Jacques Pienaar.
llvm-svn: 214852
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|