#
9add9495 |
| 11-May-2022 |
Whisperity <whisperity@gmail.com> |
[ASTMatchers][clang-tidy][NFC] Hoist `forEachTemplateArgument` matcher into the core library
Fixes the `FIXME:` related to adding `forEachTemplateArgument` to the core AST Matchers library.
Reviewe
[ASTMatchers][clang-tidy][NFC] Hoist `forEachTemplateArgument` matcher into the core library
Fixes the `FIXME:` related to adding `forEachTemplateArgument` to the core AST Matchers library.
Reviewed By: aaron.ballman
Differential Revision: http://reviews.llvm.org/D125383
show more ...
|
Revision tags: llvmorg-14.0.3, llvmorg-14.0.2, llvmorg-14.0.1, llvmorg-14.0.0, llvmorg-14.0.0-rc4, llvmorg-14.0.0-rc3, llvmorg-14.0.0-rc2, llvmorg-14.0.0-rc1, llvmorg-15-init |
|
#
589a9390 |
| 24-Jan-2022 |
Evgeny Shulgin <izaronplatz@gmail.com> |
Add `isConstinit` matcher
Support C++20 constinit variables for AST Matchers.
|
Revision tags: llvmorg-13.0.1, llvmorg-13.0.1-rc3 |
|
#
b80db150 |
| 20-Jan-2022 |
Evgeny Shulgin <izaronplatz@gmail.com> |
Add `isConsteval` matcher
Support C++20 consteval functions and C++2b if consteval for AST Matchers.
|
Revision tags: llvmorg-13.0.1-rc2 |
|
#
af27466c |
| 20-Dec-2021 |
Sam McCall <sam.mccall@gmail.com> |
Reland "[AST] Add UsingType: a sugar type for types found via UsingDecl"
This reverts commit cc56c66f27e131b914082d3bd21180646e842e9a. Fixed a bad assertion, the target of a UsingShadowDecl must not
Reland "[AST] Add UsingType: a sugar type for types found via UsingDecl"
This reverts commit cc56c66f27e131b914082d3bd21180646e842e9a. Fixed a bad assertion, the target of a UsingShadowDecl must not have *local* qualifiers, but it can be a typedef whose underlying type is qualified.
show more ...
|
#
cc56c66f |
| 20-Dec-2021 |
Sam McCall <sam.mccall@gmail.com> |
Revert "[AST] Add UsingType: a sugar type for types found via UsingDecl"
This reverts commit e1600db19d6303f84b995acb9340459694e06ea9.
Breaks sanitizer tests, at least on windows: https://lab.llvm.
Revert "[AST] Add UsingType: a sugar type for types found via UsingDecl"
This reverts commit e1600db19d6303f84b995acb9340459694e06ea9.
Breaks sanitizer tests, at least on windows: https://lab.llvm.org/buildbot/#/builders/127/builds/21592/steps/4/logs/stdio
show more ...
|
Revision tags: llvmorg-13.0.1-rc1 |
|
#
e1600db1 |
| 19-Nov-2021 |
Sam McCall <sam.mccall@gmail.com> |
[AST] Add UsingType: a sugar type for types found via UsingDecl
Currently there's no way to find the UsingDecl that a typeloc found its underlying type through. Compare to DeclRefExpr::getFoundDecl(
[AST] Add UsingType: a sugar type for types found via UsingDecl
Currently there's no way to find the UsingDecl that a typeloc found its underlying type through. Compare to DeclRefExpr::getFoundDecl().
Design decisions: - a sugar type, as there are many contexts this type of use may appear in - UsingType is a leaf like TypedefType, the underlying type has no TypeLoc - not unified with UnresolvedUsingType: a single name is appealing, but being sometimes-sugar is often fiddly. - not unified with TypedefType: the UsingShadowDecl is not a TypedefNameDecl or even a TypeDecl, and users think of these differently. - does not cover other rarer aliases like objc @compatibility_alias, in order to be have a concrete API that's easy to understand. - implicitly desugared by the hasDeclaration ASTMatcher, to avoid breaking existing patterns and following the precedent of ElaboratedType.
Scope: - This does not cover types associated with template names introduced by using declarations. A future patch should introduce a sugar TemplateName variant for this. (CTAD deduced types fall under this) - There are enough AST matchers to fix the in-tree clang-tidy tests and probably any other matchers, though more may be useful later.
Caveats: - This changes a fairly common pattern in the AST people may depend on matching. Previously, typeLoc(loc(recordType())) matched whether a struct was referred to by its original scope or introduced via using-decl. Now, the using-decl case is not matched, and needs a separate matcher. This is similar to the case of typedefs but nevertheless both adds complexity and breaks existing code.
Differential Revision: https://reviews.llvm.org/D114251
show more ...
|
#
9809c6c6 |
| 15-Nov-2021 |
James King <jamescking@google.com> |
Add `isInitCapture` and `forEachLambdaCapture` matchers.
This contributes follow-up work from https://reviews.llvm.org/D112491, which allows for increased control over the matching of lambda capture
Add `isInitCapture` and `forEachLambdaCapture` matchers.
This contributes follow-up work from https://reviews.llvm.org/D112491, which allows for increased control over the matching of lambda captures. This also updates the documentation for the `lambdaCapture` matcher.
Reviewed By: ymandel, aaron.ballman
Differential Revision: https://reviews.llvm.org/D113575
show more ...
|
#
c0b298fc |
| 08-Nov-2021 |
James King <jamescking@google.com> |
Add `LambdaCapture`-related matchers.
This provides better support for `LambdaCapture`s by making them first- class and allowing them to be bindable. In addition, this implements several `LambdaCapt
Add `LambdaCapture`-related matchers.
This provides better support for `LambdaCapture`s by making them first- class and allowing them to be bindable. In addition, this implements several `LambdaCapture`-related matchers. This does not update how lambdas are traversed. As a result, something like trying to match `lambdaCapture()` by itself will not work - it must be used as an inner matcher.
Reviewed By: aaron.ballman, sammccall
Differential Revision: https://reviews.llvm.org/D112491
show more ...
|
#
ac742965 |
| 08-Oct-2021 |
James King <jamescking@google.com> |
Add `TypeLoc`-related matchers.
Contributes several matchers that involve `TypeLoc`s. These matchers are (in alphabetical order):
- elaboratedTypeLoc - hasAnyTemplateArgumentLoc - hasNamedTypeLoc -
Add `TypeLoc`-related matchers.
Contributes several matchers that involve `TypeLoc`s. These matchers are (in alphabetical order):
- elaboratedTypeLoc - hasAnyTemplateArgumentLoc - hasNamedTypeLoc - hasPointeeLoc - hasReferentLoc - hasReturnTypeLoc - hasTemplateArgumentLoc - hasUnqualifiedLoc - pointerTypeLoc - qualifiedTypeLoc - referenceTypeLoc - templateSpecializationTypeLoc
Reviewed By: ymandel, aaron.ballman
Differential Revision: https://reviews.llvm.org/D111242
show more ...
|
Revision tags: llvmorg-13.0.0, llvmorg-13.0.0-rc4, llvmorg-13.0.0-rc3, llvmorg-13.0.0-rc2 |
|
#
c8f14827 |
| 06-Aug-2021 |
Sam McCall <sam.mccall@gmail.com> |
Reapply "Support Attr in DynTypedNode and ASTMatchers."
This reverts commit 3241680f111ddf3eac37db88cacac199083543f0. Fixed mangled post-test formatting :-(
|
#
3241680f |
| 06-Aug-2021 |
Sam McCall <sam.mccall@gmail.com> |
Revert "Support Attr in DynTypedNode and ASTMatchers."
This reverts commit a4bdcdadc6ffab250b218bbdae9a0ced05bebfc9.
Fails bots: https://lab.llvm.org/buildbot/#/builders/109/builds/20231/steps/6/lo
Revert "Support Attr in DynTypedNode and ASTMatchers."
This reverts commit a4bdcdadc6ffab250b218bbdae9a0ced05bebfc9.
Fails bots: https://lab.llvm.org/buildbot/#/builders/109/builds/20231/steps/6/logs/stdio
show more ...
|
Revision tags: llvmorg-13.0.0-rc1, llvmorg-14-init, llvmorg-12.0.1, llvmorg-12.0.1-rc4, llvmorg-12.0.1-rc3, llvmorg-12.0.1-rc2, llvmorg-12.0.1-rc1, llvmorg-12.0.0, llvmorg-12.0.0-rc5, llvmorg-12.0.0-rc4, llvmorg-12.0.0-rc3, llvmorg-12.0.0-rc2, llvmorg-11.1.0, llvmorg-11.1.0-rc3, llvmorg-12.0.0-rc1, llvmorg-13-init, llvmorg-11.1.0-rc2, llvmorg-11.1.0-rc1, llvmorg-11.0.1, llvmorg-11.0.1-rc2, llvmorg-11.0.1-rc1 |
|
#
a4bdcdad |
| 19-Oct-2020 |
Sam McCall <sam.mccall@gmail.com> |
Support Attr in DynTypedNode and ASTMatchers.
Differential Revision: https://reviews.llvm.org/D89743
|
#
b2d0c16e |
| 05-May-2021 |
Nathan Sidwell <nathan@acm.org> |
[clang] p1099 using enum part 2
This implements the 'using enum maybe-qualified-enum-tag ;' part of 1099. It introduces a new 'UsingEnumDecl', subclassed from 'BaseUsingDecl'. Much of the diff is th
[clang] p1099 using enum part 2
This implements the 'using enum maybe-qualified-enum-tag ;' part of 1099. It introduces a new 'UsingEnumDecl', subclassed from 'BaseUsingDecl'. Much of the diff is the boilerplate needed to get the new class set up.
There is one case where we accept ill-formed, but I believe this is merely an extended case of an existing bug, so consider it orthogonal. AFAICT in class-scope the c++20 rule is that no 2 using decls can bring in the same target decl ([namespace.udecl]/8). But we already accept:
struct A { enum { a }; }; struct B : A { using A::a; }; struct C : B { using A::a; using B::a; }; // same enumerator
this patch permits mixtures of 'using enum Bob;' and 'using Bob::member;' in the same way.
Differential Revision: https://reviews.llvm.org/D102241
show more ...
|
#
6a079dfd |
| 12-May-2021 |
Artem Dergachev <artem.dergachev@gmail.com> |
[ASTMatchers] Add forCallable(), a generalization of forFunction().
The new matcher additionally covers blocks and Objective-C methods.
This matcher actually makes sure that the statement truly bel
[ASTMatchers] Add forCallable(), a generalization of forFunction().
The new matcher additionally covers blocks and Objective-C methods.
This matcher actually makes sure that the statement truly belongs to that declaration's body. forFunction() incorrectly reported that a statement in a nested block belonged to the surrounding function.
forFunction() is now deprecated due to the above footgun, in favor of forCallable(functionDecl()) when only functions need to be considered.
Differential Revision: https://reviews.llvm.org/D102213
show more ...
|
#
2f181086 |
| 08-Apr-2021 |
Nikita Kniazev <kniazev.nikita@gmail.com> |
[ASTMatchers] Add `cxxBaseSpecifier` matcher (non-top-level)
Required for capturing base specifier in matchers: `cxxRecordDecl(hasDirectBase(cxxBaseSpecifier().bind("base")))`
Reviewed By: stevei
[ASTMatchers] Add `cxxBaseSpecifier` matcher (non-top-level)
Required for capturing base specifier in matchers: `cxxRecordDecl(hasDirectBase(cxxBaseSpecifier().bind("base")))`
Reviewed By: steveire, aaron.ballman
Differential Revision: https://reviews.llvm.org/D69218
show more ...
|
#
55486161 |
| 22-Mar-2021 |
Chuanqi Xu <yedeng.yd@linux.alibaba.com> |
[ASTMatcher] Add AST Matcher support for C++20 coroutine keywords
Summary: Try to enable the support for C++20 coroutine keywords for AST Matchers.
Reviewers: sammccall, njames93, aaron.ballman
Di
[ASTMatcher] Add AST Matcher support for C++20 coroutine keywords
Summary: Try to enable the support for C++20 coroutine keywords for AST Matchers.
Reviewers: sammccall, njames93, aaron.ballman
Differential Revision: https://reviews.llvm.org/D96316
show more ...
|
#
ff912063 |
| 15-Mar-2021 |
Nathan James <n.james93@hotmail.co.uk> |
[ASTMatchers][Dynamic] Add missing matchers from Registry
Add the `fixedPointLiteral`, `hasAnyBody` and `templateArgumentLoc` to the dynamic matcher registry.
Reviewed By: steveire
Differential Re
[ASTMatchers][Dynamic] Add missing matchers from Registry
Add the `fixedPointLiteral`, `hasAnyBody` and `templateArgumentLoc` to the dynamic matcher registry.
Reviewed By: steveire
Differential Revision: https://reviews.llvm.org/D98556
show more ...
|
#
ddca007a |
| 07-Feb-2021 |
Stephen Kelly <steveire@gmail.com> |
Add code complete support for mapAnyOf
|
#
45e210db |
| 07-Feb-2021 |
Stephen Kelly <steveire@gmail.com> |
[ASTMatchers] Make it possible to build mapAnyOf through the registry
|
#
d3bccdcd |
| 06-Feb-2021 |
Stephen Kelly <steveire@gmail.com> |
[ASTMatchers ]Make MatcherDescriptors indicate the node type they match
|
#
79fedadd |
| 06-Feb-2021 |
Stephen Kelly <steveire@gmail.com> |
[ASTMatchers] Add static constructor for ArgKinds of Matchers
It will soon be possible to store a node kind in an ArgKind, which will also be contructed with an ASTNodeKind. The desired Kind must b
[ASTMatchers] Add static constructor for ArgKinds of Matchers
It will soon be possible to store a node kind in an ArgKind, which will also be contructed with an ASTNodeKind. The desired Kind must be expicit.
show more ...
|
#
467a0456 |
| 30-Jan-2021 |
Stephen Kelly <steveire@gmail.com> |
[ASTMatchers] Add matchers for decomposition decls
Differential Revision: https://reviews.llvm.org/D95739
|
#
3c79734f |
| 16-Jan-2021 |
Stephen Kelly <steveire@gmail.com> |
[ASTMatchers] Add invocation matcher
Differential Revision: https://reviews.llvm.org/D94865
|
#
b765eaf9 |
| 05-Jan-2021 |
Stephen Kelly <steveire@gmail.com> |
[ASTMatchers] Add support for CXXRewrittenBinaryOperator
Differential Revision: https://reviews.llvm.org/D94130
|
#
e810e95e |
| 05-Jan-2021 |
Stephen Kelly <steveire@gmail.com> |
[ASTMatchers] Add binaryOperation matcher
This is a simple utility which allows matching on binaryOperator and cxxOperatorCallExpr. It can also be extended to support cxxRewrittenBinaryOperator.
Ad
[ASTMatchers] Add binaryOperation matcher
This is a simple utility which allows matching on binaryOperator and cxxOperatorCallExpr. It can also be extended to support cxxRewrittenBinaryOperator.
Add generic support for MapAnyOfMatchers to auto-marshalling functions.
Differential Revision: https://reviews.llvm.org/D94129
show more ...
|