Plug a unit test memory leak.

MatchFinder.addMatcher doesn't take ownership.

llvm-svn: 217162
This commit is contained in:
Benjamin Kramer 2014-09-04 15:15:27 +00:00
parent 00a56ffb8d
commit 4e3f971f58
1 changed files with 2 additions and 1 deletions

View File

@ -271,7 +271,8 @@ TEST(Transform, isFileModifiable) {
DummyTransform T("dummy", Options);
MatchFinder Finder;
Finder.addMatcher(varDecl().bind("decl"), new ModifiableCallback(T));
ModifiableCallback Callback(T);
Finder.addMatcher(varDecl().bind("decl"), &Callback);
Tool.run(tooling::newFrontendActionFactory(&Finder).get());
}