[PATCH] D18991: [ASTMatchers]: fix crash in hasReturnValue
Alexander Kornienko via cfe-commits
cfe-commits at lists.llvm.org
Mon Apr 11 14:31:17 PDT 2016
alexfh added inline comments.
================
Comment at: include/clang/ASTMatchers/ASTMatchers.h:5018
@@ -5017,1 +5017,3 @@
InnerMatcher) {
+ if (!Node.getRetValue())
+ return false;
----------------
nit: might be a bit clearer, if you reverse the condition:
if (const auto *RetValue = Node.getRetValue())
return InnerMatcher.matches(*RetValue, Finder, Builder);
return false;
http://reviews.llvm.org/D18991
More information about the cfe-commits
mailing list