[PATCH] D71846: [ASTMatchers] Fix for https://bugs.llvm.org/show_bug.cgi?id=44364
Aaron Ballman via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Dec 26 09:56:51 PST 2019
aaron.ballman accepted this revision.
aaron.ballman added a comment.
This revision is now accepted and ready to land.
LGTM aside from a minor style nit.
================
Comment at: clang/include/clang/ASTMatchers/ASTMatchers.h:4325-4326
+ internal::Matcher<Stmt>, InnerMatcher) {
+ const Stmt *const Init = Node.getInit();
+ return (Init != nullptr && InnerMatcher.matches(*Init, Finder, Builder));
+}
----------------
Can drop the top-level `const` qualifier on the pointer (we don't typically do that). And can remove the extra parens around the `return` expression. e.g.,
```
const Stmt *Init = Node.getInit();
return Init && InnerMatcher.matches(*Init, Finder, Builder);
```
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D71846/new/
https://reviews.llvm.org/D71846
More information about the cfe-commits
mailing list