From 81d08294384d968ebbc2d0584d1b987f1a8a01b3 Mon Sep 17 00:00:00 2001 From: David Blaikie Date: Fri, 6 Jan 2017 17:47:10 +0000 Subject: Revert "IntrusiveRefCntPtr -> std::shared_ptr for CompilerInvocationBase and CodeCompleteConsumer" Caused a memory leak reported by asan. Reverting while I investigate. This reverts commit r291184. llvm-svn: 291249 --- clang/unittests/Frontend/CodeGenActionTest.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'clang/unittests/Frontend/CodeGenActionTest.cpp') diff --git a/clang/unittests/Frontend/CodeGenActionTest.cpp b/clang/unittests/Frontend/CodeGenActionTest.cpp index 1d2a50c8bc2..356b5130fcb 100644 --- a/clang/unittests/Frontend/CodeGenActionTest.cpp +++ b/clang/unittests/Frontend/CodeGenActionTest.cpp @@ -41,7 +41,7 @@ public: TEST(CodeGenTest, TestNullCodeGen) { - auto Invocation = std::make_shared(); + CompilerInvocation *Invocation = new 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(std::move(Invocation)); + Compiler.setInvocation(Invocation); Compiler.createDiagnostics(); EXPECT_TRUE(Compiler.hasDiagnostics()); -- cgit v1.2.3