diff --git a/clang-tools-extra/unittests/clang-modernize/TransformTest.cpp b/clang-tools-extra/unittests/clang-modernize/TransformTest.cpp index 6115efd57d3a..84f0641481a2 100644 --- a/clang-tools-extra/unittests/clang-modernize/TransformTest.cpp +++ b/clang-tools-extra/unittests/clang-modernize/TransformTest.cpp @@ -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()); }