diff options
Diffstat (limited to 'gnu/llvm/tools/clang/unittests/Frontend/CodeGenActionTest.cpp')
| -rw-r--r-- | gnu/llvm/tools/clang/unittests/Frontend/CodeGenActionTest.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/gnu/llvm/tools/clang/unittests/Frontend/CodeGenActionTest.cpp b/gnu/llvm/tools/clang/unittests/Frontend/CodeGenActionTest.cpp index 71446fd4d79..1d2a50c8bc2 100644 --- a/gnu/llvm/tools/clang/unittests/Frontend/CodeGenActionTest.cpp +++ b/gnu/llvm/tools/clang/unittests/Frontend/CodeGenActionTest.cpp @@ -11,9 +11,10 @@ // //===----------------------------------------------------------------------===// -#include "clang/Frontend/CompilerInstance.h" -#include "clang/CodeGen/CodeGenAction.h" #include "clang/CodeGen/BackendUtil.h" +#include "clang/CodeGen/CodeGenAction.h" +#include "clang/Frontend/CompilerInstance.h" +#include "clang/Lex/PreprocessorOptions.h" #include "gtest/gtest.h" using namespace llvm; @@ -40,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()); @@ -49,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()); |
