|
Revision tags: llvmorg-20.1.0, llvmorg-20.1.0-rc3, llvmorg-20.1.0-rc2, llvmorg-20.1.0-rc1, llvmorg-21-init, llvmorg-19.1.7, llvmorg-19.1.6, llvmorg-19.1.5, llvmorg-19.1.4, llvmorg-19.1.3, llvmorg-19.1.2, llvmorg-19.1.1, llvmorg-19.1.0, llvmorg-19.1.0-rc4, llvmorg-19.1.0-rc3, llvmorg-19.1.0-rc2, llvmorg-19.1.0-rc1, llvmorg-20-init, llvmorg-18.1.8, llvmorg-18.1.7, llvmorg-18.1.6, llvmorg-18.1.5, llvmorg-18.1.4, llvmorg-18.1.3, llvmorg-18.1.2, llvmorg-18.1.1, llvmorg-18.1.0, llvmorg-18.1.0-rc4, llvmorg-18.1.0-rc3, llvmorg-18.1.0-rc2, llvmorg-18.1.0-rc1, llvmorg-19-init, llvmorg-17.0.6, llvmorg-17.0.5, llvmorg-17.0.4, llvmorg-17.0.3, llvmorg-17.0.2, llvmorg-17.0.1, llvmorg-17.0.0, llvmorg-17.0.0-rc4, llvmorg-17.0.0-rc3, llvmorg-17.0.0-rc2, llvmorg-17.0.0-rc1, llvmorg-18-init, llvmorg-16.0.6, llvmorg-16.0.5, llvmorg-16.0.4, llvmorg-16.0.3, llvmorg-16.0.2, llvmorg-16.0.1, llvmorg-16.0.0, llvmorg-16.0.0-rc4, llvmorg-16.0.0-rc3, llvmorg-16.0.0-rc2, llvmorg-16.0.0-rc1, llvmorg-17-init, llvmorg-15.0.7, llvmorg-15.0.6, llvmorg-15.0.5, llvmorg-15.0.4, llvmorg-15.0.3, llvmorg-15.0.2, llvmorg-15.0.1, llvmorg-15.0.0, llvmorg-15.0.0-rc3, llvmorg-15.0.0-rc2, llvmorg-15.0.0-rc1, llvmorg-16-init, llvmorg-14.0.6, llvmorg-14.0.5, llvmorg-14.0.4, 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 |
|
| #
805f7a4f |
| 09-Feb-2022 |
David Goldman <[email protected]> |
[clang] Add `ObjCProtocolLoc` to represent protocol references
Add `ObjCProtocolLoc` which behaves like `TypeLoc` but for `ObjCProtocolDecl` references.
RecursiveASTVisitor now synthesizes `ObjCPro
[clang] Add `ObjCProtocolLoc` to represent protocol references
Add `ObjCProtocolLoc` which behaves like `TypeLoc` but for `ObjCProtocolDecl` references.
RecursiveASTVisitor now synthesizes `ObjCProtocolLoc` during traversal and the `ObjCProtocolLoc` can be stored in a `DynTypedNode`.
In a follow up patch, I'll update clangd to make use of this to properly support protocol references for hover + goto definition.
Differential Revision: https://reviews.llvm.org/D119363
show more ...
|
|
Revision tags: llvmorg-14.0.0-rc1, llvmorg-15-init, llvmorg-13.0.1, llvmorg-13.0.1-rc3, llvmorg-13.0.1-rc2, llvmorg-13.0.1-rc1 |
|
| #
57b40b5f |
| 12-Oct-2021 |
Kazu Hirata <[email protected]> |
[AST, CodeGen, Driver] Use llvm::is_contained (NFC)
|
|
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 <[email protected]> |
Reapply "Support Attr in DynTypedNode and ASTMatchers."
This reverts commit 3241680f111ddf3eac37db88cacac199083543f0. Fixed mangled post-test formatting :-(
|
| #
3241680f |
| 06-Aug-2021 |
Sam McCall <[email protected]> |
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 <[email protected]> |
Support Attr in DynTypedNode and ASTMatchers.
Differential Revision: https://reviews.llvm.org/D89743
|
| #
e4d5f000 |
| 04-Feb-2021 |
Stephen Kelly <[email protected]> |
[ASTMatchers] Fix hasParent while ignoring unwritten nodes
For example, before this patch we can use has() to get from a cxxRewrittenBinaryOperator to its operand, but hasParent doesn't get back to
[ASTMatchers] Fix hasParent while ignoring unwritten nodes
For example, before this patch we can use has() to get from a cxxRewrittenBinaryOperator to its operand, but hasParent doesn't get back to the cxxRewrittenBinaryOperator. This patch fixes that.
Differential Revision: https://reviews.llvm.org/D96113
show more ...
|
| #
5e180181 |
| 21-Nov-2020 |
Stephen Kelly <[email protected]> |
Remove the IgnoreImplicitCastsAndParentheses traversal kind
Differential Revision: https://reviews.llvm.org/D91918
|
|
Revision tags: llvmorg-11.0.0, llvmorg-11.0.0-rc6, llvmorg-11.0.0-rc5, llvmorg-11.0.0-rc4, llvmorg-11.0.0-rc3, llvmorg-11.0.0-rc2, llvmorg-11.0.0-rc1, llvmorg-12-init, llvmorg-10.0.1, llvmorg-10.0.1-rc4, llvmorg-10.0.1-rc3, llvmorg-10.0.1-rc2 |
|
| #
52ff86d2 |
| 21-Jun-2020 |
Stephen Kelly <[email protected]> |
[AST] Fix traversal over CXXConstructExpr in Syntactic mode
Summary: Skip over elidable nodes, and ensure that intermediate CXXFunctionalCastExpr nodes are also skipped if they are semantic.
Review
[AST] Fix traversal over CXXConstructExpr in Syntactic mode
Summary: Skip over elidable nodes, and ensure that intermediate CXXFunctionalCastExpr nodes are also skipped if they are semantic.
Reviewers: klimek, ymandel
Subscribers: cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D82278
show more ...
|
| #
1ad94624 |
| 24-Sep-2020 |
Sam McCall <[email protected]> |
[AST] Use data-recursion when building ParentMap, avoid stack overflow.
The following crashes on my system before this patch, but not after:
void foo(int i) { switch (i) { case 1:
[AST] Use data-recursion when building ParentMap, avoid stack overflow.
The following crashes on my system before this patch, but not after:
void foo(int i) { switch (i) { case 1: case 2: ... 100000 cases ... ; } }
clang-query -c="match stmt(hasAncestor(stmt()))" deep.c
I'm not sure it's actually a sane testcase to run though, it's pretty slow :-)
Differential Revision: https://reviews.llvm.org/D88222
show more ...
|
|
Revision tags: llvmorg-10.0.1-rc1, llvmorg-10.0.0, llvmorg-10.0.0-rc6, llvmorg-10.0.0-rc5, llvmorg-10.0.0-rc4, llvmorg-10.0.0-rc3, llvmorg-10.0.0-rc2 |
|
| #
cd625114 |
| 12-Feb-2020 |
Reid Kleckner <[email protected]> |
Remove clang::ast_type_traits namespace in favor of clang
DynTypedNode and ASTNodeKind are implemented as part of the clang AST library, which uses the main clang namespace. There doesn't seem to be
Remove clang::ast_type_traits namespace in favor of clang
DynTypedNode and ASTNodeKind are implemented as part of the clang AST library, which uses the main clang namespace. There doesn't seem to be a need for this extra level of namespacing.
I left behind aliases in the ast_type_traits namespace for out of tree clients of these APIs. To provide aliases for the enumerators, I used this pattern: namespace ast_type_traits { constexpr TraversalKind TK_AsIs = ::clang::TK_AsIs; } I think the typedefs will be useful for migration, but we might be able to drop these enumerator aliases.
Reviewed By: aaron.ballman
Differential Revision: https://reviews.llvm.org/D74499
show more ...
|
|
Revision tags: llvmorg-10.0.0-rc1 |
|
| #
0a57d14a |
| 27-Jan-2020 |
Stephen Kelly <[email protected]> |
[ASTMatchers] Fix parent traversal with InitListExpr
Children of InitListExpr are traversed twice by RAV, so this code populates a vector to represent the possibly-multiple parents (in reality in th
[ASTMatchers] Fix parent traversal with InitListExpr
Children of InitListExpr are traversed twice by RAV, so this code populates a vector to represent the possibly-multiple parents (in reality in this situation the parent is the same and is therefore de-duplicated).
show more ...
|
| #
f29204d3 |
| 24-Jan-2020 |
Stephen Kelly <[email protected]> |
NFC: Implement AST node skipping in ParentMapContext
Summary: This allows ASTContext to store only one parent map, rather than storing an entire parent map for each traversal mode used.
This is the
NFC: Implement AST node skipping in ParentMapContext
Summary: This allows ASTContext to store only one parent map, rather than storing an entire parent map for each traversal mode used.
This is therefore a partial revert of commit 0a717d5b (Make it possible control matcher traversal kind with ASTContext, 2019-12-06).
Reviewers: aaron.ballman, rsmith, rnk
Subscribers: cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D73388
show more ...
|
|
Revision tags: llvmorg-11-init, llvmorg-9.0.1, llvmorg-9.0.1-rc3 |
|
| #
8a81daaa |
| 10-Dec-2019 |
Reid Kleckner <[email protected]> |
[AST] Split parent map traversal logic into ParentMapContext.h
The only part of ASTContext.h that requires most AST types to be complete is the parent map. Nothing in Clang proper uses the ParentMap
[AST] Split parent map traversal logic into ParentMapContext.h
The only part of ASTContext.h that requires most AST types to be complete is the parent map. Nothing in Clang proper uses the ParentMap, so split it out into its own class. Make ASTContext own the ParentMapContext so there is still a one-to-one relationship.
After this change, 562 fewer files depend on ASTTypeTraits.h, and 66 fewer depend on TypeLoc.h: $ diff -u deps-before.txt deps-after.txt | \ grep '^[-+] ' | sort | uniq -c | sort -nr | less 562 - ../clang/include/clang/AST/ASTTypeTraits.h 340 + ../clang/include/clang/AST/ParentMapContext.h 66 - ../clang/include/clang/AST/TypeLocNodes.def 66 - ../clang/include/clang/AST/TypeLoc.h 15 - ../clang/include/clang/AST/TemplateBase.h ... I computed deps-before.txt and deps-after.txt with `ninja -t deps`.
This removes a common and key dependency on TemplateBase.h and TypeLoc.h.
This also has the effect of breaking the ParentMap RecursiveASTVisitor instantiation into its own file, which roughly halves the compilation time of ASTContext.cpp (29.75s -> 17.66s). The new file takes 13.8s to compile.
I left behind forwarding methods for getParents(), but clients will need to include a new header to make them work: #include "clang/AST/ParentMapContext.h"
I noticed that this parent map functionality is unfortunately duplicated in ParentMap.h, which only works for Stmt nodes.
Reviewed By: rsmith
Differential Revision: https://reviews.llvm.org/D71313
show more ...
|