diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2015-01-18 16:23:48 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2015-01-18 16:23:48 +0000 |
commit | 06d4ba388873e6d1cfa9cd715a8935ecc8cd2097 (patch) | |
tree | 3eb853da77d46cc77c4b017525a422f9ddb1385b /unittests/Lex/PPConditionalDirectiveRecordTest.cpp | |
parent | 30d791273d07fac9c0c1641a0731191bca6e8606 (diff) |
Notes
Diffstat (limited to 'unittests/Lex/PPConditionalDirectiveRecordTest.cpp')
-rw-r--r-- | unittests/Lex/PPConditionalDirectiveRecordTest.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/unittests/Lex/PPConditionalDirectiveRecordTest.cpp b/unittests/Lex/PPConditionalDirectiveRecordTest.cpp index e63106c295a3..946cb88b9810 100644 --- a/unittests/Lex/PPConditionalDirectiveRecordTest.cpp +++ b/unittests/Lex/PPConditionalDirectiveRecordTest.cpp @@ -90,8 +90,8 @@ TEST_F(PPConditionalDirectiveRecordTest, PPRecAPI) { "#endif\n" "9\n"; - MemoryBuffer *buf = MemoryBuffer::getMemBuffer(source); - SourceMgr.setMainFileID(SourceMgr.createFileID(buf)); + std::unique_ptr<MemoryBuffer> Buf = MemoryBuffer::getMemBuffer(source); + SourceMgr.setMainFileID(SourceMgr.createFileID(std::move(Buf))); VoidModuleLoader ModLoader; HeaderSearch HeaderInfo(new HeaderSearchOptions, SourceMgr, Diags, LangOpts, @@ -103,7 +103,7 @@ TEST_F(PPConditionalDirectiveRecordTest, PPRecAPI) { PP.Initialize(*Target); PPConditionalDirectiveRecord * PPRec = new PPConditionalDirectiveRecord(SourceMgr); - PP.addPPCallbacks(PPRec); + PP.addPPCallbacks(std::unique_ptr<PPCallbacks>(PPRec)); PP.EnterMainSourceFile(); std::vector<Token> toks; |