summaryrefslogtreecommitdiffstats
path: root/clang/tools/CIndex/CIndex.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/tools/CIndex/CIndex.cpp')
-rw-r--r--clang/tools/CIndex/CIndex.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/clang/tools/CIndex/CIndex.cpp b/clang/tools/CIndex/CIndex.cpp
index 2b56bfb7d10..01130e22773 100644
--- a/clang/tools/CIndex/CIndex.cpp
+++ b/clang/tools/CIndex/CIndex.cpp
@@ -996,7 +996,8 @@ CXTranslationUnit clang_createTranslationUnit(CXIndex CIdx,
CIndexer *CXXIdx = static_cast<CIndexer *>(CIdx);
- return ASTUnit::LoadFromPCHFile(ast_filename, DefaultDiag(),
+ llvm::IntrusiveRefCntPtr<Diagnostic> Diags;
+ return ASTUnit::LoadFromPCHFile(ast_filename, Diags,
CXXIdx->getOnlyLocalDecls(),
0, 0, true);
}
@@ -1015,8 +1016,8 @@ clang_createTranslationUnitFromSourceFile(CXIndex CIdx,
// Configure the diagnostics.
DiagnosticOptions DiagOpts;
- llvm::MaybeOwningPtr<Diagnostic> Diags;
- Diags.reset(CompilerInstance::createDiagnostics(DiagOpts, 0, 0), true);
+ llvm::IntrusiveRefCntPtr<Diagnostic> Diags;
+ Diags = CompilerInstance::createDiagnostics(DiagOpts, 0, 0);
llvm::SmallVector<ASTUnit::RemappedFile, 4> RemappedFiles;
for (unsigned I = 0; I != num_unsaved_files; ++I) {
OpenPOWER on IntegriCloud