diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2017-04-16 16:02:28 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2017-04-16 16:02:28 +0000 |
commit | 7442d6faa2719e4e7d33a7021c406c5a4facd74d (patch) | |
tree | c72b9241553fc9966179aba84f90f17bfa9235c3 /tools/libclang/CIndexCodeCompletion.cpp | |
parent | b52119637f743680a99710ce5fdb6646da2772af (diff) |
Diffstat (limited to 'tools/libclang/CIndexCodeCompletion.cpp')
-rw-r--r-- | tools/libclang/CIndexCodeCompletion.cpp | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/tools/libclang/CIndexCodeCompletion.cpp b/tools/libclang/CIndexCodeCompletion.cpp index ca68bc1cd28ee..c2b4c0bcb072a 100644 --- a/tools/libclang/CIndexCodeCompletion.cpp +++ b/tools/libclang/CIndexCodeCompletion.cpp @@ -270,10 +270,6 @@ struct AllocatedCXCodeCompleteResults : public CXCodeCompleteResults { /// \brief Source manager, used for diagnostics. IntrusiveRefCntPtr<SourceManager> SourceMgr; - /// \brief Temporary files that should be removed once we have finished - /// with the code-completion results. - std::vector<std::string> TemporaryFiles; - /// \brief Temporary buffers that will be deleted once we have finished with /// the code-completion results. SmallVector<const llvm::MemoryBuffer *, 1> TemporaryBuffers; @@ -320,7 +316,8 @@ AllocatedCXCodeCompleteResults::AllocatedCXCodeCompleteResults( : CXCodeCompleteResults(), DiagOpts(new DiagnosticOptions), Diag(new DiagnosticsEngine( IntrusiveRefCntPtr<DiagnosticIDs>(new DiagnosticIDs), &*DiagOpts)), - FileMgr(FileMgr), SourceMgr(new SourceManager(*Diag, *FileMgr)), + FileMgr(std::move(FileMgr)), + SourceMgr(new SourceManager(*Diag, *this->FileMgr)), CodeCompletionAllocator( std::make_shared<clang::GlobalCodeCompletionAllocator>()), Contexts(CXCompletionContext_Unknown), @@ -334,8 +331,6 @@ AllocatedCXCodeCompleteResults::~AllocatedCXCodeCompleteResults() { llvm::DeleteContainerPointers(DiagnosticsWrappers); delete [] Results; - for (unsigned I = 0, N = TemporaryFiles.size(); I != N; ++I) - llvm::sys::fs::remove(TemporaryFiles[I]); for (unsigned I = 0, N = TemporaryBuffers.size(); I != N; ++I) delete TemporaryBuffers[I]; |