summaryrefslogtreecommitdiffstats
path: root/clang/lib/Lex/Preprocessor.cpp
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2014-08-27 20:54:45 +0000
committerDavid Blaikie <dblaikie@gmail.com>2014-08-27 20:54:45 +0000
commit49cc3181a264ee03eb680b03b80a01a812b2b9e9 (patch)
treeb4c751e431dbd1e56fba597b1ee59052f1f643c0 /clang/lib/Lex/Preprocessor.cpp
parent833bc681e32b5aba400ed47ad4da27686d86ce19 (diff)
downloadbcm5719-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/lib/Lex/Preprocessor.cpp')
-rw-r--r--clang/lib/Lex/Preprocessor.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Lex/Preprocessor.cpp b/clang/lib/Lex/Preprocessor.cpp
index 29956c9f584..1dd46b0de9b 100644
--- a/clang/lib/Lex/Preprocessor.cpp
+++ b/clang/lib/Lex/Preprocessor.cpp
@@ -406,7 +406,7 @@ bool Preprocessor::SetCodeCompletionPoint(const FileEntry *File,
char *NewPos = std::copy(Buffer->getBufferStart(), Position, NewBuf);
*NewPos = '\0';
std::copy(Position, Buffer->getBufferEnd(), NewPos+1);
- SourceMgr.overrideFileContents(File, NewBuffer.release());
+ SourceMgr.overrideFileContents(File, std::move(NewBuffer));
}
return false;
OpenPOWER on IntegriCloud