[clang-tools-extra] r216615 - Update for Clang API change.
David Blaikie
dblaikie at gmail.com
Wed Aug 27 13:54:51 PDT 2014
Author: dblaikie
Date: Wed Aug 27 15:54:50 2014
New Revision: 216615
URL: http://llvm.org/viewvc/llvm-project?rev=216615&view=rev
Log:
Update for Clang API change.
Modified:
clang-tools-extra/trunk/clang-apply-replacements/tool/ClangApplyReplacementsMain.cpp
clang-tools-extra/trunk/unittests/include/common/VirtualFileHelper.h
Modified: clang-tools-extra/trunk/clang-apply-replacements/tool/ClangApplyReplacementsMain.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clang-apply-replacements/tool/ClangApplyReplacementsMain.cpp?rev=216615&r1=216614&r2=216615&view=diff
==============================================================================
--- clang-tools-extra/trunk/clang-apply-replacements/tool/ClangApplyReplacementsMain.cpp (original)
+++ clang-tools-extra/trunk/clang-apply-replacements/tool/ClangApplyReplacementsMain.cpp Wed Aug 27 15:54:50 2014
@@ -188,9 +188,8 @@ bool applyFormatting(const std::vector<t
FileManager Files((FileSystemOptions()));
SourceManager SM(Diagnostics, Files);
- SM.overrideFileContents(
- Files.getFile(FileName),
- llvm::MemoryBuffer::getMemBufferCopy(FileData).release());
+ SM.overrideFileContents(Files.getFile(FileName),
+ llvm::MemoryBuffer::getMemBufferCopy(FileData));
Rewriter Rewrites(SM, LangOptions());
return getRewrittenData(FormattingReplacements, Rewrites, FormattedFileData);
Modified: clang-tools-extra/trunk/unittests/include/common/VirtualFileHelper.h
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/unittests/include/common/VirtualFileHelper.h?rev=216615&r1=216614&r2=216615&view=diff
==============================================================================
--- clang-tools-extra/trunk/unittests/include/common/VirtualFileHelper.h (original)
+++ clang-tools-extra/trunk/unittests/include/common/VirtualFileHelper.h Wed Aug 27 15:54:50 2014
@@ -63,7 +63,7 @@ public:
llvm::MemoryBuffer::getMemBuffer(I->Code);
const FileEntry *Entry = SM.getFileManager().getVirtualFile(
I->FileName, Buf->getBufferSize(), /*ModificationTime=*/0);
- SM.overrideFileContents(Entry, Buf.release());
+ SM.overrideFileContents(Entry, std::move(Buf));
}
}
More information about the cfe-commits
mailing list