forked from OSchip/llvm-project
Plug a unit test memory leak.
MatchFinder.addMatcher doesn't take ownership. llvm-svn: 217162
This commit is contained in:
parent
00a56ffb8d
commit
4e3f971f58
|
@ -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());
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue