[PATCH] D90984: Update matchers to be traverse-aware

2020-11-17 Thread Stephen Kelly via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG4cadb66b490e: [AST] Update matchers to be traverse-aware (authored by stephenkelly). Changed prior to commit: https://reviews.llvm.org/D90984?vs=3

[PATCH] D90984: Update matchers to be traverse-aware

2020-11-17 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. LGTM, thank you! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D90984/new/ https://reviews.llvm.org/D90984 ___

[PATCH] D90984: Update matchers to be traverse-aware

2020-11-17 Thread Stephen Kelly via Phabricator via cfe-commits
steveire added inline comments. Comment at: clang/include/clang/ASTMatchers/ASTMatchers.h:4083 +return false; + return InnerMatcher.matches(*Arg->IgnoreParenImpCasts(), Finder, Builder); } aaron.ballman wrote: > This probably shouldn't compile given that th

[PATCH] D90984: Update matchers to be traverse-aware

2020-11-17 Thread Stephen Kelly via Phabricator via cfe-commits
steveire updated this revision to Diff 305777. steveire added a comment. Update Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D90984/new/ https://reviews.llvm.org/D90984 Files: clang/include/clang/ASTMatchers/ASTMatchers.h clang/include/clang/A

[PATCH] D90984: Update matchers to be traverse-aware

2020-11-17 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/include/clang/ASTMatchers/ASTMatchers.h:4083 +return false; + return InnerMatcher.matches(*Arg->IgnoreParenImpCasts(), Finder, Builder); } This probably shouldn't compile given that there's no declarati

[PATCH] D90984: Update matchers to be traverse-aware

2020-11-17 Thread Stephen Kelly via Phabricator via cfe-commits
steveire updated this revision to Diff 305768. steveire added a comment. Update Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D90984/new/ https://reviews.llvm.org/D90984 Files: clang/include/clang/ASTMatchers/ASTMatchers.h clang/include/clang/A

[PATCH] D90984: Update matchers to be traverse-aware

2020-11-16 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/include/clang/ASTMatchers/ASTMatchers.h:3115 + + if (!Finder->isTraversalAsIs() && (*MatchIt)->isImplicit()) +return false; steveire wrote: > aaron.ballman wrote: > > If the traversal is not `AsIs`, that

[PATCH] D90984: Update matchers to be traverse-aware

2020-11-16 Thread Stephen Kelly via Phabricator via cfe-commits
steveire added inline comments. Comment at: clang/include/clang/ASTMatchers/ASTMatchers.h:3115 + + if (!Finder->isTraversalAsIs() && (*MatchIt)->isImplicit()) +return false; aaron.ballman wrote: > If the traversal is not `AsIs`, that doesn't mean it's > `Ig

[PATCH] D90984: Update matchers to be traverse-aware

2020-11-12 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/include/clang/ASTMatchers/ASTMatchers.h:3115 + + if (!Finder->isTraversalAsIs() && (*MatchIt)->isImplicit()) +return false; If the traversal is not `AsIs`, that doesn't mean it's `IgnoreUnlessSpelledInS

[PATCH] D90984: Update matchers to be traverse-aware

2020-11-10 Thread Stephen Kelly via Phabricator via cfe-commits
steveire added inline comments. Comment at: clang/unittests/ASTMatchers/ASTMatchersTraversalTest.cpp:2368 NonTrivial m_nt; - HasCtorInits() : NoSpecialMethods(), m_i(42) {} }; aaron.ballman wrote: > Was this originally testing behavior with explicitly initia

[PATCH] D90984: Update matchers to be traverse-aware

2020-11-10 Thread Stephen Kelly via Phabricator via cfe-commits
steveire updated this revision to Diff 304298. steveire added a comment. Update Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D90984/new/ https://reviews.llvm.org/D90984 Files: clang/include/clang/ASTMatchers/ASTMatchers.h clang/include/clang/A

[PATCH] D90984: Update matchers to be traverse-aware

2020-11-10 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/include/clang/ASTMatchers/ASTMatchers.h:3115 + + if (Finder->getASTContext().getParentMapContext().getTraversalKind() != + TK_AsIs && steveire wrote: > aaron.ballman wrote: > > Given how often this

[PATCH] D90984: Update matchers to be traverse-aware

2020-11-10 Thread Stephen Kelly via Phabricator via cfe-commits
steveire added a comment. I added the release note to D90982 , which this change follows. Comment at: clang/include/clang/ASTMatchers/ASTMatchers.h:3115 + + if (Finder->getASTContext().getParentMapContext().getTraversalKind() != + TK_

[PATCH] D90984: Update matchers to be traverse-aware

2020-11-10 Thread Stephen Kelly via Phabricator via cfe-commits
steveire updated this revision to Diff 304104. steveire marked an inline comment as done. steveire added a comment. Update Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D90984/new/ https://reviews.llvm.org/D90984 Files: clang/include/clang/ASTMat

[PATCH] D90984: Update matchers to be traverse-aware

2020-11-09 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. I think this change should come with a warning in the release notes because it silently changes the behavior of existing matchers in a way that may be surprising to users. I think the behavior is correct in that these constructs are all implicit nodes that aren't

[PATCH] D90984: Update matchers to be traverse-aware

2020-11-06 Thread Stephen Kelly via Phabricator via cfe-commits
steveire created this revision. steveire added a reviewer: aaron.ballman. Herald added a project: clang. Herald added a subscriber: cfe-commits. steveire requested review of this revision. Don't match Stmt or Decl nodes not spelled in the source when using TK_IgnoreUnlessSpelledInSource. This pre