[PATCH] D80025: [ASTMatcher] Correct memoization bug ignoring direction (descendants or ancestors)
Manuel Klimek via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon May 18 03:10:40 PDT 2020
klimek added inline comments.
================
Comment at: clang/lib/ASTMatchers/ASTMatchFinder.cpp:46-49
+enum class MatchDirection {
+ Ancestors,
+ Descendants
+};
----------------
Nice find! Why don't we need more states though?
1. wouldn't hasParent() followed by a hasAncestor() also trigger the memoization? (if so, we'd need transitive / non-transitive)
2. can we trigger a directional match and a non-directional (non-traversal, for example, explicit) match in the same memoization scope?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D80025/new/
https://reviews.llvm.org/D80025
More information about the cfe-commits
mailing list