Re: [PATCH] D16215: ASTMatchers: enable hasBody() matcher for FunctionDecls

2016-01-20 Thread Aaron Ballman via cfe-commits
aaron.ballman closed this revision. aaron.ballman added a comment. Thanks! I went ahead and commit in r258322. http://reviews.llvm.org/D16215 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-

Re: [PATCH] D16215: ASTMatchers: enable hasBody() matcher for FunctionDecls

2016-01-20 Thread Aleksei Sidorin via cfe-commits
a.sidorin updated this revision to Diff 45360. a.sidorin added a comment. Replace NULL with nullptr. http://reviews.llvm.org/D16215 Files: docs/LibASTMatchersReference.html include/clang/ASTMatchers/ASTMatchers.h include/clang/ASTMatchers/ASTMatchersInternal.h unittests/ASTMatchers/ASTM

Re: [PATCH] D16215: ASTMatchers: enable hasBody() matcher for FunctionDecls

2016-01-19 Thread Aaron Ballman via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. With one small nit, LGTM, thanks! Comment at: include/clang/ASTMatchers/ASTMatchersInternal.h:1596 @@ +1595,3 @@ +inline const Stmt *GetBodyMatcher::get(const Fu

Re: [PATCH] D16215: ASTMatchers: enable hasBody() matcher for FunctionDecls

2016-01-19 Thread Aleksei Sidorin via cfe-commits
a.sidorin updated this revision to Diff 45267. a.sidorin added a comment. Fix issues pointed on review. http://reviews.llvm.org/D16215 Files: docs/LibASTMatchersReference.html include/clang/ASTMatchers/ASTMatchers.h include/clang/ASTMatchers/ASTMatchersInternal.h unittests/ASTMatchers/A

Re: [PATCH] D16215: ASTMatchers: enable hasBody() matcher for FunctionDecls

2016-01-19 Thread Aaron Ballman via cfe-commits
aaron.ballman added inline comments. Comment at: include/clang/ASTMatchers/ASTMatchers.h:3118 @@ -3119,1 +3117,3 @@ +/// \brief Matches a 'for', 'while', 'do while' statement or a function +/// declaration that has a given body. /// s/declaration/definition. ===

Re: [PATCH] D16215: ASTMatchers: enable hasBody() matcher for FunctionDecls

2016-01-19 Thread Aleksei Sidorin via cfe-commits
a.sidorin updated this revision to Diff 45232. a.sidorin added a comment. Match only FunctionDecls which are definitions and ignore redeclarations without bodies. http://reviews.llvm.org/D16215 Files: docs/LibASTMatchersReference.html include/clang/ASTMatchers/ASTMatchers.h include/clang

Re: [PATCH] D16215: ASTMatchers: enable hasBody() matcher for FunctionDecls

2016-01-15 Thread Aaron Ballman via cfe-commits
aaron.ballman added a comment. The examples and test code you use seem to imply that the isDefinition() matcher may be all you need; is isDefinition() insufficient for some reason? If so, can you expand the test cases to cover that particular usage? Also, FunctionDecl::getBody() does more work

Re: [PATCH] D16215: ASTMatchers: enable hasBody() matcher for FunctionDecls

2016-01-15 Thread Aleksei Sidorin via cfe-commits
a.sidorin updated this revision to Diff 44975. a.sidorin added a comment. Update comments and documentation. http://reviews.llvm.org/D16215 Files: docs/LibASTMatchersReference.html include/clang/ASTMatchers/ASTMatchers.h unittests/ASTMatchers/ASTMatchersTest.cpp unittests/ASTMatchers/Dy

[PATCH] D16215: ASTMatchers: enable hasBody() matcher for FunctionDecls

2016-01-15 Thread Aleksei Sidorin via cfe-commits
a.sidorin created this revision. a.sidorin added reviewers: klimek, aaron.ballman. a.sidorin added a subscriber: cfe-commits. Herald added a subscriber: klimek. This patch enables matching for FunctionDecls that have bodies. http://reviews.llvm.org/D16215 Files: include/clang/ASTMatchers/ASTMa