From 854d36bd9bb42f50f87925fbdd59c47282d9e2c0 Mon Sep 17 00:00:00 2001 From: Daniel Dunbar Date: Sat, 30 Jan 2010 23:31:40 +0000 Subject: CIndex: Fix ReportSerializedDiagnostics to honor the DiagnosticClient contract that diagnostics with a source location should occur inside {Begin,End}SourceFile. Note that code completion is currently passing in an invalid LangOptions object due to its implementation, I need to sort this out with Doug. llvm-svn: 94927 --- clang/tools/CIndex/CIndex.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'clang/tools/CIndex/CIndex.cpp') diff --git a/clang/tools/CIndex/CIndex.cpp b/clang/tools/CIndex/CIndex.cpp index 1afd8c23ba1..718aff02ed0 100644 --- a/clang/tools/CIndex/CIndex.cpp +++ b/clang/tools/CIndex/CIndex.cpp @@ -1095,7 +1095,8 @@ clang_createTranslationUnitFromSourceFile(CXIndex CIdx, ATU->unlinkTemporaryFile(); ReportSerializedDiagnostics(DiagnosticsFile, *Diags, - num_unsaved_files, unsaved_files); + num_unsaved_files, unsaved_files, + ATU->getASTContext().getLangOptions()); for (unsigned i = 0, e = TemporaryFiles.size(); i != e; ++i) TemporaryFiles[i].eraseFromDisk(); -- cgit v1.2.3