summaryrefslogtreecommitdiff
path: root/unittests/AST/CommentParser.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'unittests/AST/CommentParser.cpp')
-rw-r--r--unittests/AST/CommentParser.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/unittests/AST/CommentParser.cpp b/unittests/AST/CommentParser.cpp
index ae1410f377fa..f6ef9b9b7cea 100644
--- a/unittests/AST/CommentParser.cpp
+++ b/unittests/AST/CommentParser.cpp
@@ -54,8 +54,8 @@ protected:
};
FullComment *CommentParserTest::parseString(const char *Source) {
- MemoryBuffer *Buf = MemoryBuffer::getMemBuffer(Source);
- FileID File = SourceMgr.createFileID(Buf);
+ std::unique_ptr<MemoryBuffer> Buf = MemoryBuffer::getMemBuffer(Source);
+ FileID File = SourceMgr.createFileID(std::move(Buf));
SourceLocation Begin = SourceMgr.getLocForStartOfFile(File);
Lexer L(Allocator, Diags, Traits, Begin, Source, Source + strlen(Source));