[PATCH] D19324: [ASTMatchers] new forEachOverriden matcher
Clement Courbet via cfe-commits
cfe-commits at lists.llvm.org
Thu Apr 21 05:55:59 PDT 2016
courbet added inline comments.
================
Comment at: unittests/ASTMatchers/ASTMatchersTest.cpp:2084
@@ +2083,3 @@
+ Code1, ForEachOverriddenInClass("C"),
+ new VerifyIdIsBoundTo<CXXMethodDecl>("override", "f", 1)));
+ EXPECT_TRUE(matchAndVerifyResultTrue(
----------------
aaron.ballman wrote:
> Can you write the tests such that they don't leak?
matchAndVerifyResultConditionally deletes them:
```
template <typename T>
testing::AssertionResult
matchAndVerifyResultConditionally(const std::string &Code, const T &AMatcher,
BoundNodesCallback *FindResultVerifier,
bool ExpectResult) {
std::unique_ptr<BoundNodesCallback> ScopedVerifier(FindResultVerifier);
```
I'll send you a (separate) patch for taking a unique_ptr in.
http://reviews.llvm.org/D19324
More information about the cfe-commits
mailing list