[PATCH] D97681: [ASTMatchers] Add matchers for `CXXDeleteExpr`
Aaron Ballman via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Mar 1 07:04:10 PST 2021
aaron.ballman added inline comments.
================
Comment at: clang/include/clang/ASTMatchers/ASTMatchers.h:7621
+/// matches the expression 'delete Ptr'.
+AST_MATCHER_P_OVERLOAD(CXXDeleteExpr, deletes, internal::Matcher<Expr>,
+ InnerMatcher, 1) {
----------------
Why add this instead of continuing to use `has()`? (I worry a bit that we'll want to add a verb for different subexpression matchers and it won't scale well or we won't add verbs for different subexpressions and this'll introduce a new inconsistency.)
================
Comment at: clang/include/clang/ASTMatchers/ASTMatchersInternal.h:163
+inline bool isArrayOperator(const CXXDeleteExpr &Node) {
+ return Node.isArrayFormAsWritten();
+}
----------------
Do we need/want this interface to consider whether the user is matching things spelled in source or not?
================
Comment at: clang/lib/ASTMatchers/Dynamic/Registry.cpp:269
REGISTER_MATCHER(hasAnyUsingShadowDecl);
- REGISTER_MATCHER(hasArgument);
REGISTER_MATCHER(hasArgumentOfType);
----------------
Why removing this?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D97681/new/
https://reviews.llvm.org/D97681
More information about the cfe-commits
mailing list