diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2014-08-17 23:27:13 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2014-08-17 23:27:13 +0000 |
commit | 91ac8dfa9df498f277eef6c725ba180a83a950a4 (patch) | |
tree | a0222fac105109d255885f6e1c2a8f1d9b349452 /clang | |
parent | 1a1b1562e63e1b160dfc99968f14d56d00648e9b (diff) | |
download | bcm5719-llvm-91ac8dfa9df498f277eef6c725ba180a83a950a4.tar.gz bcm5719-llvm-91ac8dfa9df498f277eef6c725ba180a83a950a4.zip |
Create a std::unique_ptr earlier.
Thanks to David Blaikie for the suggestion.
llvm-svn: 215865
Diffstat (limited to 'clang')
-rw-r--r-- | clang/unittests/Basic/VirtualFileSystemTest.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/clang/unittests/Basic/VirtualFileSystemTest.cpp b/clang/unittests/Basic/VirtualFileSystemTest.cpp index 89836816e8c..39febca92b0 100644 --- a/clang/unittests/Basic/VirtualFileSystemTest.cpp +++ b/clang/unittests/Basic/VirtualFileSystemTest.cpp @@ -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( |