Author: d0k
Date: Thu Sep  4 10:15:27 2014
New Revision: 217162

URL: http://llvm.org/viewvc/llvm-project?rev=217162&view=rev
Log:
Plug a unit test memory leak.

MatchFinder.addMatcher doesn't take ownership.

Modified:
    clang-tools-extra/trunk/unittests/clang-modernize/TransformTest.cpp

Modified: clang-tools-extra/trunk/unittests/clang-modernize/TransformTest.cpp
URL: 
http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/unittests/clang-modernize/TransformTest.cpp?rev=217162&r1=217161&r2=217162&view=diff
==============================================================================
--- clang-tools-extra/trunk/unittests/clang-modernize/TransformTest.cpp 
(original)
+++ clang-tools-extra/trunk/unittests/clang-modernize/TransformTest.cpp Thu Sep 
 4 10:15:27 2014
@@ -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());
 }
 


_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to