r215865 - Create a std::unique_ptr earlier.
Rafael Espindola
rafael.espindola at gmail.com
Sun Aug 17 16:27:13 PDT 2014
Author: rafael
Date: Sun Aug 17 18:27:13 2014
New Revision: 215865
URL: http://llvm.org/viewvc/llvm-project?rev=215865&view=rev
Log:
Create a std::unique_ptr earlier.
Thanks to David Blaikie for the suggestion.
Modified:
cfe/trunk/unittests/Basic/VirtualFileSystemTest.cpp
Modified: cfe/trunk/unittests/Basic/VirtualFileSystemTest.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/unittests/Basic/VirtualFileSystemTest.cpp?rev=215865&r1=215864&r2=215865&view=diff
==============================================================================
--- cfe/trunk/unittests/Basic/VirtualFileSystemTest.cpp (original)
+++ cfe/trunk/unittests/Basic/VirtualFileSystemTest.cpp Sun Aug 17 18:27:13 2014
@@ -539,9 +539,9 @@ public:
IntrusiveRefCntPtr<vfs::FileSystem>
getFromYAMLRawString(StringRef Content,
IntrusiveRefCntPtr<vfs::FileSystem> ExternalFS) {
- MemoryBuffer *Buffer = MemoryBuffer::getMemBuffer(Content);
- return getVFSFromYAML(std::unique_ptr<MemoryBuffer>(Buffer),
- CountingDiagHandler, this, ExternalFS);
+ std::unique_ptr<MemoryBuffer> Buffer(MemoryBuffer::getMemBuffer(Content));
+ return getVFSFromYAML(std::move(Buffer), CountingDiagHandler, this,
+ ExternalFS);
}
IntrusiveRefCntPtr<vfs::FileSystem> getFromYAMLString(
More information about the cfe-commits
mailing list