diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2014-08-17 22:20:33 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2014-08-17 22:20:33 +0000 |
commit | b16ecf8224ff3ce98e0f7eb36ca97c08ba3ad550 (patch) | |
tree | 9ab93518255c9df50a5164f5f78189b59b408a46 /llvm/unittests/Support/YAMLParserTest.cpp | |
parent | 976e3e8693384c66467db4e73366899560479dbf (diff) | |
download | llvm-b16ecf8224ff3ce98e0f7eb36ca97c08ba3ad550.zip llvm-b16ecf8224ff3ce98e0f7eb36ca97c08ba3ad550.tar.gz llvm-b16ecf8224ff3ce98e0f7eb36ca97c08ba3ad550.tar.bz2 |
Convert an ownership comment with std::uinque_ptr.
llvm-svn: 215855
Diffstat (limited to 'llvm/unittests/Support/YAMLParserTest.cpp')
-rw-r--r-- | llvm/unittests/Support/YAMLParserTest.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/llvm/unittests/Support/YAMLParserTest.cpp b/llvm/unittests/Support/YAMLParserTest.cpp index cd8b9f7..1a5188a 100644 --- a/llvm/unittests/Support/YAMLParserTest.cpp +++ b/llvm/unittests/Support/YAMLParserTest.cpp @@ -210,8 +210,9 @@ TEST(YAMLParser, DiagnosticFilenameFromBufferID) { // When we construct a YAML stream over a named buffer, // we get its ID as filename in diagnostics. - MemoryBuffer* Buffer = MemoryBuffer::getMemBuffer("[]", "buffername.yaml"); - yaml::Stream Stream(Buffer, SM); + std::unique_ptr<MemoryBuffer> Buffer( + MemoryBuffer::getMemBuffer("[]", "buffername.yaml")); + yaml::Stream Stream(std::move(Buffer), SM); Stream.printError(Stream.begin()->getRoot(), "Hello, World!"); EXPECT_EQ("buffername.yaml", GeneratedDiag.getFilename()); } |