summaryrefslogtreecommitdiff
path: root/unittests/Frontend/CodeGenActionTest.cpp
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2017-01-06 20:13:35 +0000
committerDimitry Andric <dim@FreeBSD.org>2017-01-06 20:13:35 +0000
commit6694ed095d6b27a2c92ec4fd63664fcd88a05749 (patch)
tree0633c29bd8350e306f3a24a30f3f6045efd35420 /unittests/Frontend/CodeGenActionTest.cpp
parentd5dc75c5cf109efe52b1da32ec44a667389a0f0a (diff)
Notes
Diffstat (limited to 'unittests/Frontend/CodeGenActionTest.cpp')
-rw-r--r--unittests/Frontend/CodeGenActionTest.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/unittests/Frontend/CodeGenActionTest.cpp b/unittests/Frontend/CodeGenActionTest.cpp
index 356b5130fcbe9..1d2a50c8bc208 100644
--- a/unittests/Frontend/CodeGenActionTest.cpp
+++ b/unittests/Frontend/CodeGenActionTest.cpp
@@ -41,7 +41,7 @@ public:
TEST(CodeGenTest, TestNullCodeGen) {
- CompilerInvocation *Invocation = new CompilerInvocation;
+ auto Invocation = std::make_shared<CompilerInvocation>();
Invocation->getPreprocessorOpts().addRemappedFile(
"test.cc",
MemoryBuffer::getMemBuffer("").release());
@@ -50,7 +50,7 @@ TEST(CodeGenTest, TestNullCodeGen) {
Invocation->getFrontendOpts().ProgramAction = EmitLLVM;
Invocation->getTargetOpts().Triple = "i386-unknown-linux-gnu";
CompilerInstance Compiler;
- Compiler.setInvocation(Invocation);
+ Compiler.setInvocation(std::move(Invocation));
Compiler.createDiagnostics();
EXPECT_TRUE(Compiler.hasDiagnostics());