[PATCH] D113943: Add `withIntrospection` matcher.
Adrian Vogelsgesang via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Dec 9 15:19:50 PST 2021
avogelsgesang added a comment.
Nit:
Personally, I would prefer the name `withDebugOutput` over `withIntrospection`, as it more clearly describes the intent of this matcher.
At least to me, "introspection" is usually something done programatically, i.e. the matcher somehow reflects about its own state, but in this case all we are doing is printing some debug output to stderr.
Code looks good to me, but I don't know the LLVM coding guidelines and hence can't provide an actual code review
================
Comment at: clang/include/clang/ASTMatchers/ASTMatchers.h:3000-3001
+ const internal::Matcher<T> &InnerMatcher) {
+ return internal::Matcher<T>(new internal::WithIntrospectionMatcher<T>(
+ BeforeTag, AfterTag, InnerMatcher));
+}
----------------
std::move(BeforeTag), std::move(AfterTag)
No need to create additional copies of those strings. Here and other places
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D113943/new/
https://reviews.llvm.org/D113943
More information about the cfe-commits
mailing list