summaryrefslogtreecommitdiffstats
path: root/clang/unittests/AST/CommentParser.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/unittests/AST/CommentParser.cpp')
-rw-r--r--clang/unittests/AST/CommentParser.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/unittests/AST/CommentParser.cpp b/clang/unittests/AST/CommentParser.cpp
index ae1410f377f..8c3895bda67 100644
--- a/clang/unittests/AST/CommentParser.cpp
+++ b/clang/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(Buf.release());
SourceLocation Begin = SourceMgr.getLocForStartOfFile(File);
Lexer L(Allocator, Diags, Traits, Begin, Source, Source + strlen(Source));
OpenPOWER on IntegriCloud