This revision was automatically updated to reflect the committed changes.
Closed by commit rC323158: Add hasTrailingReturn AST matcher (authored by
juliehockett, committed by ).
Repository:
rC Clang
https://reviews.llvm.org/D42273
Files:
docs/LibASTMatchersReference.html
aaron.ballman accepted this revision.
aaron.ballman added a comment.
LGTM!
https://reviews.llvm.org/D42273
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
juliehockett updated this revision to Diff 130908.
juliehockett added a comment.
Adding test case -- thank you for the advice!
https://reviews.llvm.org/D42273
Files:
docs/LibASTMatchersReference.html
include/clang/ASTMatchers/ASTMatchers.h
lib/ASTMatchers/Dynamic/Registry.cpp
lebedev.ri added inline comments.
Comment at: include/clang/ASTMatchers/ASTMatchers.h:5904
+return F->hasTrailingReturn();
+ return false;
+}
aaron.ballman wrote:
> lebedev.ri wrote:
> > juliehockett wrote:
> > > lebedev.ri wrote:
> > > > There are no
aaron.ballman added inline comments.
Comment at: include/clang/ASTMatchers/ASTMatchers.h:5904
+return F->hasTrailingReturn();
+ return false;
+}
lebedev.ri wrote:
> juliehockett wrote:
> > lebedev.ri wrote:
> > > There are no negative tests in the unittest
lebedev.ri added inline comments.
Comment at: include/clang/ASTMatchers/ASTMatchers.h:5904
+return F->hasTrailingReturn();
+ return false;
+}
juliehockett wrote:
> lebedev.ri wrote:
> > There are no negative tests in the unittest that cover this false path.
juliehockett added inline comments.
Comment at: include/clang/ASTMatchers/ASTMatchers.h:5904
+return F->hasTrailingReturn();
+ return false;
+}
lebedev.ri wrote:
> There are no negative tests in the unittest that cover this false path.
Is there a test case
lebedev.ri added inline comments.
Comment at: include/clang/ASTMatchers/ASTMatchers.h:5904
+return F->hasTrailingReturn();
+ return false;
+}
There are no negative tests in the unittest that cover this false path.
https://reviews.llvm.org/D42273
aaron.ballman accepted this revision.
aaron.ballman added a comment.
This revision is now accepted and ready to land.
LGTM with a minor commenting/documentation nit.
Comment at: include/clang/ASTMatchers/ASTMatchers.h:5898
+/// \code
+/// int X() {};
+/// auto Y() -> int {};
juliehockett updated this revision to Diff 130671.
juliehockett marked 2 inline comments as done.
juliehockett added a comment.
Updating matcher and fixing semicolons
https://reviews.llvm.org/D42273
Files:
docs/LibASTMatchersReference.html
include/clang/ASTMatchers/ASTMatchers.h
aaron.ballman added inline comments.
Comment at: include/clang/ASTMatchers/ASTMatchers.h:5902
+AST_MATCHER(FunctionDecl, hasTrailingReturn) {
+ return Node.getType()->castAs()->hasTrailingReturn();
+}
I think this may cause failed assertions on code like `void
juliehockett created this revision.
juliehockett added a reviewer: aaron.ballman.
Herald added a subscriber: klimek.
Adds AST matcher for a FunctionDecl that has a trailing return type.
https://reviews.llvm.org/D42273
Files:
docs/LibASTMatchersReference.html
12 matches
Mail list logo