jcking1034 added inline comments.
Comment at: clang/docs/tools/dump_ast_matchers.py:13
+CLASS_INDEX_PAGE =
urlopen("https://clang.llvm.org/doxygen/classes.html;).read()
+
aaron.ballman wrote:
> Do we need to handle an exception here if there are network
jcking1034 created this revision.
jcking1034 added a reviewer: ymandel.
Herald added a subscriber: arphaman.
jcking1034 requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.
It may be possible to avoid relying on accessing many individual class
jcking1034 added inline comments.
Comment at: clang/include/clang/ASTMatchers/ASTMatchers.h:6406-6414
+/// Matches reference `TypeLoc`s.
+///
+/// Given
+/// \code
+/// int x = 3;
+/// int& xx = x;
+/// \endcode
jcking1034 wrote:
> aaron.ballman wrote:
> >
jcking1034 updated this revision to Diff 378037.
jcking1034 added a comment.
Catch and reraise exceptions with an appropriate message.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D111332/new/
https://reviews.llvm.org/D111332
Files:
jcking1034 created this revision.
jcking1034 added reviewers: ymandel, aaron.ballman, tdl-g.
jcking1034 requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D111518
Files:
jcking1034 updated this revision to Diff 378279.
jcking1034 added a comment.
Rebase onto master
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D111332/new/
https://reviews.llvm.org/D111332
Files:
clang/docs/LibASTMatchersReference.html
jcking1034 updated this revision to Diff 378298.
jcking1034 added a comment.
Rebase onto master
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D111242/new/
https://reviews.llvm.org/D111242
Files:
clang/docs/LibASTMatchersReference.html
jcking1034 updated this revision to Diff 378236.
jcking1034 added a comment.
Add docstring to `link_if_exists`.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D111332/new/
https://reviews.llvm.org/D111332
Files:
jcking1034 added a comment.
@aaron.ballman that sounds like a good idea, what's the process for adding a
release note?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D111242/new/
https://reviews.llvm.org/D111242
jcking1034 updated this revision to Diff 376302.
jcking1034 added a comment.
Restore original formatting on unchanged lines.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D110586/new/
https://reviews.llvm.org/D110586
Files:
jcking1034 updated this revision to Diff 376389.
jcking1034 added a comment.
Construct an object of the derived type, instead of the base type.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D110586/new/
https://reviews.llvm.org/D110586
Files:
jcking1034 marked an inline comment as done.
jcking1034 added inline comments.
Comment at: clang/include/clang/AST/ASTTypeTraits.h:472
+ assert(ASTNodeKind::getFromNodeKind().isBaseOf(NodeKind));
+ return *static_cast(reinterpret_cast(Storage));
+}
jcking1034 updated this revision to Diff 376573.
jcking1034 marked an inline comment as done.
jcking1034 added a comment.
Fix typing for `create` and add unit tests.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D110586/new/
jcking1034 updated this revision to Diff 376901.
jcking1034 marked an inline comment as done.
jcking1034 added a comment.
Update unit test to better exercise `getNodeAs`
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D110586/new/
jcking1034 marked an inline comment as not done.
jcking1034 added inline comments.
Comment at: clang/unittests/AST/ASTTypeTraitsTest.cpp:212
+ DynTypedNode Node = DynTypedNode::create(tl);
+ EXPECT_TRUE(Node == Node);
+ EXPECT_FALSE(Node < Node);
sbenza
jcking1034 created this revision.
jcking1034 added reviewers: ymandel, tdl-g.
jcking1034 requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.
Contributes several matchers that involve `TypeLoc`s.
Repository:
rG LLVM Github Monorepo
jcking1034 marked an inline comment as not done.
jcking1034 added inline comments.
Comment at: clang/include/clang/ASTMatchers/ASTMatchers.h:6358
+/// \code
+/// int* x = 0;
+/// \endcode
ymandel wrote:
> I think you need a const here (to the right) to be
jcking1034 updated this revision to Diff 377845.
jcking1034 added a comment.
Update matchers reference page.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D111242/new/
https://reviews.llvm.org/D111242
Files:
jcking1034 updated this revision to Diff 377854.
jcking1034 added a comment.
Fix documentation for hasTemplateArgumentLoc.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D111242/new/
https://reviews.llvm.org/D111242
Files:
jcking1034 updated this revision to Diff 377885.
jcking1034 added a comment.
Actually fix documentation for `hasTemplateArgumentLoc`.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D111242/new/
https://reviews.llvm.org/D111242
Files:
jcking1034 updated this revision to Diff 377933.
jcking1034 marked 2 inline comments as done.
jcking1034 added a comment.
Address comments.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D111242/new/
https://reviews.llvm.org/D111242
Files:
jcking1034 marked an inline comment as not done.
jcking1034 added inline comments.
Comment at: clang/docs/LibASTMatchersReference.html:636
jcking1034 updated this revision to Diff 376610.
jcking1034 added a comment.
Clean up unit tests.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D110586/new/
https://reviews.llvm.org/D110586
Files:
clang/include/clang/AST/ASTTypeTraits.h
jcking1034 updated this revision to Diff 376939.
jcking1034 added a comment.
Include additional expectation in unit test
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D110586/new/
https://reviews.llvm.org/D110586
Files:
jcking1034 updated this revision to Diff 376944.
jcking1034 added a comment.
Fix pointer style
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D110586/new/
https://reviews.llvm.org/D110586
Files:
clang/include/clang/AST/ASTTypeTraits.h
jcking1034 created this revision.
jcking1034 added reviewers: ymandel, tdl-g, sbenza.
jcking1034 requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.
This provides better support for TypeLocs to allow TypeLoc-related
Matchers to feature
jcking1034 updated this revision to Diff 390429.
jcking1034 added a comment.
Chang `withTag` to `withIntrospection`
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D113943/new/
https://reviews.llvm.org/D113943
Files:
jcking1034 added a comment.
@hokein @aaron.ballman Following up on this, let me know if there are any other
action items to address!
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D113917/new/
https://reviews.llvm.org/D113917
jcking1034 added inline comments.
Comment at: clang/include/clang/ASTMatchers/ASTMatchersInternal.h:1021
+ std::string getName() const override {
+return "HasOverloadedOperatorNameMatcher";
Here and below, we have the option to use the name of the matcher
jcking1034 created this revision.
jcking1034 added reviewers: ymandel, tdl-g, aaron.ballman.
jcking1034 requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.
This contains changes to the AST Matcher infrastructure in order to provide
contextual
jcking1034 updated this revision to Diff 388327.
jcking1034 marked 2 inline comments as done.
jcking1034 added a comment.
Update comments, drop "Matcher" suffix from `getName`s
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D113917/new/
jcking1034 marked an inline comment as done.
jcking1034 added inline comments.
Comment at: clang/include/clang/ASTMatchers/ASTMatchersInternal.h:1022
+ std::string getName() const override {
+return "HasOverloadedOperatorNameMatcher";
+ }
ymandel wrote:
>
jcking1034 updated this revision to Diff 388041.
jcking1034 added a comment.
Add tests, rename `getMatcherName` to `getName`, update `makeAllOfComposite`
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D113917/new/
https://reviews.llvm.org/D113917
jcking1034 updated this revision to Diff 388045.
jcking1034 added a comment.
Change `getMatcherName` to `getName`
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D113943/new/
https://reviews.llvm.org/D113943
Files:
jcking1034 updated this revision to Diff 386577.
jcking1034 added a comment.
Add additional unit tests.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D113575/new/
https://reviews.llvm.org/D113575
Files:
clang/docs/LibASTMatchersReference.html
jcking1034 marked an inline comment as done.
jcking1034 added inline comments.
Comment at: clang/include/clang/ASTMatchers/ASTMatchers.h:4224
+/// float z;
+/// auto f = [=]() { return x + y + z; };
+/// }
fowles wrote:
> it would be nice to be able to
jcking1034 created this revision.
jcking1034 added reviewers: ymandel, tdl-g, aaron.ballman, fowles.
jcking1034 requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.
This contributes follow-up work from https://reviews.llvm.org/D112491, which
jcking1034 created this revision.
jcking1034 added reviewers: ymandel, tdl-g, aaron.ballman.
jcking1034 requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.
Adds a `withTag` matcher which outputs contextual information for
better debugging.
jcking1034 added inline comments.
Comment at: clang/include/clang/ASTMatchers/ASTMatchersInternal.h:152
+ }
+MAKE_MATCHER_NAME_FROM_TYPE(TemplateArgument)
+MAKE_MATCHER_NAME_FROM_TYPE(TemplateArgumentLoc)
hokein wrote:
> These are types that are not covered in
jcking1034 updated this revision to Diff 389620.
jcking1034 marked 3 inline comments as done.
jcking1034 added a comment.
Herald added a reviewer: jdoerfert.
Herald added a subscriber: sstefan1.
Address comments.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
jcking1034 updated this revision to Diff 387769.
jcking1034 added a comment.
Improve wrapping of PolymorphicMatchers
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D113943/new/
https://reviews.llvm.org/D113943
Files:
jcking1034 added inline comments.
Comment at: clang/include/clang/ASTMatchers/ASTMatchersInternal.h:1409
return BindableMatcher(
- makeAllOfComposite(InnerMatchers).template dynCastTo());
+ makeAllOfComposite(InnerMatchers).template dynCastTo(),
+
jcking1034 updated this revision to Diff 383823.
jcking1034 marked 4 inline comments as done.
jcking1034 added a comment.
Update missed names; remove original implementations of `hasAnyCapture`.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
jcking1034 updated this revision to Diff 384114.
jcking1034 added a comment.
Update documentation for `capturesVar` matcher.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D112491/new/
https://reviews.llvm.org/D112491
Files:
jcking1034 updated this revision to Diff 382397.
jcking1034 marked an inline comment as done.
jcking1034 added a comment.
Update comment with example
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D112491/new/
https://reviews.llvm.org/D112491
jcking1034 updated this revision to Diff 382391.
jcking1034 marked 3 inline comments as done.
jcking1034 added a comment.
Revert changes to ASTMatchFinder
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D112491/new/
https://reviews.llvm.org/D112491
jcking1034 updated this revision to Diff 383458.
jcking1034 marked 2 inline comments as done.
jcking1034 added a comment.
Update matcher names for clarity.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D112491/new/
https://reviews.llvm.org/D112491
jcking1034 added inline comments.
Comment at: clang/include/clang/ASTMatchers/ASTMatchers.h:4652
+/// matches `[this]() { return cc; }`.
+AST_MATCHER(LambdaCapture, refersToThis) { return Node.capturesThis(); }
+
sammccall wrote:
> Again, why `refersToThis`
jcking1034 marked an inline comment as not done.
jcking1034 added a comment.
I agree that having two ways to match the same thing is a usability concern and
could definitely be confusing. Deprecating non-bindable matchers could be a
possibility and is probably the right way to go if we choose
jcking1034 updated this revision to Diff 383115.
jcking1034 added a comment.
Update comment with additional example.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D112491/new/
https://reviews.llvm.org/D112491
Files:
jcking1034 updated this revision to Diff 383128.
jcking1034 added a comment.
Regenerate documentation.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D112491/new/
https://reviews.llvm.org/D112491
Files:
clang/docs/LibASTMatchersReference.html
jcking1034 updated this revision to Diff 383126.
jcking1034 added a comment.
Deprecate original overloads of `hasAnyCapture`.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D112491/new/
https://reviews.llvm.org/D112491
Files:
jcking1034 updated this revision to Diff 382410.
jcking1034 added a comment.
Update comments and tests
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D112491/new/
https://reviews.llvm.org/D112491
Files:
clang/docs/LibASTMatchersReference.html
jcking1034 added a comment.
@aaron.ballman for the purpose of these matchers, what @ymandel said is correct
- the goal is to allow `LambdaCapture`s themselves to be bindable.
Comment at: clang/include/clang/ASTMatchers/ASTMatchers.h:4629-4630
+/// matches `[x](){}`.
jcking1034 added a comment.
@aaron.ballman Just wanted to confirm with you that the work here and release
notes look good and can be wrapped up so that I can have @ymandel submit!
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D112491/new/
jcking1034 marked an inline comment as done.
jcking1034 added inline comments.
Comment at: clang/docs/ReleaseNotes.rst:223-229
+- ``LambdaCapture`` AST Matchers are now available. These matchers allow for
+ the binding of ``LambdaCapture`` nodes, and include the
jcking1034 updated this revision to Diff 384835.
jcking1034 added a comment.
Update release notes.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D112491/new/
https://reviews.llvm.org/D112491
Files:
clang/docs/LibASTMatchersReference.html
jcking1034 marked an inline comment as done.
jcking1034 added a comment.
@fowles @aaron.ballman I'll take a look at `forEachCapture` in the next patch.
Also, I've discovered that the `VarDecl` node has a member function
`isInitCapture` that seems like it could allow us to distinguish between
jcking1034 updated this revision to Diff 384578.
jcking1034 added a comment.
Rebase onto main.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D112491/new/
https://reviews.llvm.org/D112491
Files:
clang/docs/LibASTMatchersReference.html
jcking1034 created this revision.
jcking1034 added reviewers: ymandel, aaron.ballman.
jcking1034 requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.
This provides better support for `LambdaCapture`s, and implements several
jcking1034 created this revision.
jcking1034 added reviewers: ymandel, tdl-g, aaron.ballman.
jcking1034 requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.
Updates the return types of these matchers' definitions to use
`internal::Matcher`
61 matches
Mail list logo