summaryrefslogtreecommitdiffstats
path: root/clang/unittests/Lex/PPCallbacksTest.cpp
diff options
context:
space:
mode:
authorCraig Topper <craig.topper@gmail.com>2014-09-10 04:53:53 +0000
committerCraig Topper <craig.topper@gmail.com>2014-09-10 04:53:53 +0000
commitb8a705305562a8312e6d63ced9c8237d9fae21f3 (patch)
tree114deebfd15c4e4b9defd7aa4ae4b9b41bbe744e /clang/unittests/Lex/PPCallbacksTest.cpp
parent7ff15929606a9004dba0c9a18371aa5438b927d2 (diff)
downloadbcm5719-llvm-b8a705305562a8312e6d63ced9c8237d9fae21f3.tar.gz
bcm5719-llvm-b8a705305562a8312e6d63ced9c8237d9fae21f3.zip
Unique_ptrify PPCallbacks ownership.
Unique_ptr creation stil needs to be moved earlier at some of the call sites. llvm-svn: 217474
Diffstat (limited to 'clang/unittests/Lex/PPCallbacksTest.cpp')
-rw-r--r--clang/unittests/Lex/PPCallbacksTest.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/unittests/Lex/PPCallbacksTest.cpp b/clang/unittests/Lex/PPCallbacksTest.cpp
index f020206470a..af046c4e354 100644
--- a/clang/unittests/Lex/PPCallbacksTest.cpp
+++ b/clang/unittests/Lex/PPCallbacksTest.cpp
@@ -176,7 +176,7 @@ protected:
/*OwnsHeaderSearch =*/false);
PP.Initialize(*Target);
InclusionDirectiveCallbacks* Callbacks = new InclusionDirectiveCallbacks;
- PP.addPPCallbacks(Callbacks); // Takes ownership.
+ PP.addPPCallbacks(std::unique_ptr<PPCallbacks>(Callbacks));
// Lex source text.
PP.EnterMainSourceFile();
@@ -222,7 +222,7 @@ protected:
Sema S(PP, Context, Consumer);
Parser P(PP, S, false);
PragmaOpenCLExtensionCallbacks* Callbacks = new PragmaOpenCLExtensionCallbacks;
- PP.addPPCallbacks(Callbacks); // Takes ownership.
+ PP.addPPCallbacks(std::unique_ptr<PPCallbacks>(Callbacks));
// Lex source text.
PP.EnterMainSourceFile();
OpenPOWER on IntegriCloud