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/Basic/SourceManagerTest.cpp | |
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/Basic/SourceManagerTest.cpp')
-rw-r--r-- | clang/unittests/Basic/SourceManagerTest.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/unittests/Basic/SourceManagerTest.cpp b/clang/unittests/Basic/SourceManagerTest.cpp index dc27560b3a8..540a8051e60 100644 --- a/clang/unittests/Basic/SourceManagerTest.cpp +++ b/clang/unittests/Basic/SourceManagerTest.cpp @@ -193,7 +193,7 @@ TEST_F(SourceManagerTest, getMacroArgExpandedLocation) { const FileEntry *headerFile = FileMgr.getVirtualFile("/test-header.h", HeaderBuf->getBufferSize(), 0); - SourceMgr.overrideFileContents(headerFile, HeaderBuf.release()); + SourceMgr.overrideFileContents(headerFile, std::move(HeaderBuf)); VoidModuleLoader ModLoader; HeaderSearch HeaderInfo(new HeaderSearchOptions, SourceMgr, Diags, LangOpts, @@ -291,7 +291,7 @@ TEST_F(SourceManagerTest, isBeforeInTranslationUnitWithMacroInInclude) { const FileEntry *headerFile = FileMgr.getVirtualFile("/test-header.h", HeaderBuf->getBufferSize(), 0); - SourceMgr.overrideFileContents(headerFile, HeaderBuf.release()); + SourceMgr.overrideFileContents(headerFile, std::move(HeaderBuf)); VoidModuleLoader ModLoader; HeaderSearch HeaderInfo(new HeaderSearchOptions, SourceMgr, Diags, LangOpts, |