summaryrefslogtreecommitdiffstats
path: root/tools/CIndex/CIndexCodeCompletion.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tools/CIndex/CIndexCodeCompletion.cpp')
-rw-r--r--tools/CIndex/CIndexCodeCompletion.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/tools/CIndex/CIndexCodeCompletion.cpp b/tools/CIndex/CIndexCodeCompletion.cpp
index 3b7674e..264e506 100644
--- a/tools/CIndex/CIndexCodeCompletion.cpp
+++ b/tools/CIndex/CIndexCodeCompletion.cpp
@@ -187,6 +187,9 @@ struct AllocatedCXCodeCompleteResults : public CXCodeCompleteResults {
/// \brief Diagnostics produced while performing code completion.
llvm::SmallVector<StoredDiagnostic, 8> Diagnostics;
+ /// \brief Diag object
+ Diagnostic Diag;
+
/// \brief Language options used to adjust source locations.
LangOptions LangOpts;
@@ -202,7 +205,7 @@ struct AllocatedCXCodeCompleteResults : public CXCodeCompleteResults {
};
AllocatedCXCodeCompleteResults::AllocatedCXCodeCompleteResults()
- : CXCodeCompleteResults(), Buffer(0) { }
+ : CXCodeCompleteResults(), Buffer(0), SourceMgr(Diag) { }
AllocatedCXCodeCompleteResults::~AllocatedCXCodeCompleteResults() {
for (unsigned I = 0, N = NumResults; I != N; ++I)
OpenPOWER on IntegriCloud