diff options
author | David Blaikie <dblaikie@gmail.com> | 2014-08-27 20:54:45 +0000 |
---|---|---|
committer | David Blaikie <dblaikie@gmail.com> | 2014-08-27 20:54:45 +0000 |
commit | 49cc3181a264ee03eb680b03b80a01a812b2b9e9 (patch) | |
tree | b4c751e431dbd1e56fba597b1ee59052f1f643c0 /clang/unittests/Tooling | |
parent | 833bc681e32b5aba400ed47ad4da27686d86ce19 (diff) | |
download | bcm5719-llvm-49cc3181a264ee03eb680b03b80a01a812b2b9e9.tar.gz bcm5719-llvm-49cc3181a264ee03eb680b03b80a01a812b2b9e9.zip |
Overload SourceManager::overrideFileContents so that unconditionally passing ownership is explicitly done using unique_ptr.
Only those callers who are dynamically passing ownership should need the
3 argument form. Those accepting the default ("do pass ownership")
should do so explicitly with a unique_ptr now.
llvm-svn: 216614
Diffstat (limited to 'clang/unittests/Tooling')
-rw-r--r-- | clang/unittests/Tooling/RewriterTestContext.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/unittests/Tooling/RewriterTestContext.h b/clang/unittests/Tooling/RewriterTestContext.h index bf25f8c9989..82c00582f1f 100644 --- a/clang/unittests/Tooling/RewriterTestContext.h +++ b/clang/unittests/Tooling/RewriterTestContext.h @@ -52,7 +52,7 @@ class RewriterTestContext { llvm::MemoryBuffer::getMemBuffer(Content); const FileEntry *Entry = Files.getVirtualFile(Name, Source->getBufferSize(), 0); - Sources.overrideFileContents(Entry, Source.release()); + Sources.overrideFileContents(Entry, std::move(Source)); assert(Entry != nullptr); return Sources.createFileID(Entry, SourceLocation(), SrcMgr::C_User); } |