diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2010-11-18 20:06:41 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2010-11-18 20:06:41 +0000 |
commit | d00406486421143c5e4eb79f9ce97e30442b1ab2 (patch) | |
tree | eb2ff8461358578c978f17ddfa7f597b9f6a1022 /clang/tools/libclang/CIndexCodeCompletion.cpp | |
parent | 4fadc5b20a3afbad542e0841692dc851d0507136 (diff) | |
download | llvm-d00406486421143c5e4eb79f9ce97e30442b1ab2.zip llvm-d00406486421143c5e4eb79f9ce97e30442b1ab2.tar.gz llvm-d00406486421143c5e4eb79f9ce97e30442b1ab2.tar.bz2 |
Refactoring of Diagnostic class.
-Move the stuff of Diagnostic related to creating/querying diagnostic IDs into a new DiagnosticIDs class.
-DiagnosticIDs can be shared among multiple Diagnostics for multiple translation units.
-The rest of the state in Diagnostic object is considered related and tied to one translation unit.
-Have Diagnostic point to the SourceManager that is related with. Diagnostic can now accept just a
SourceLocation instead of a FullSourceLoc.
-Reflect the changes to various interfaces.
llvm-svn: 119730
Diffstat (limited to 'clang/tools/libclang/CIndexCodeCompletion.cpp')
-rw-r--r-- | clang/tools/libclang/CIndexCodeCompletion.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/clang/tools/libclang/CIndexCodeCompletion.cpp b/clang/tools/libclang/CIndexCodeCompletion.cpp index 06c418d..01c855e 100644 --- a/clang/tools/libclang/CIndexCodeCompletion.cpp +++ b/clang/tools/libclang/CIndexCodeCompletion.cpp @@ -258,7 +258,9 @@ struct AllocatedCXCodeCompleteResults : public CXCodeCompleteResults { static unsigned CodeCompletionResultObjects; AllocatedCXCodeCompleteResults::AllocatedCXCodeCompleteResults() - : CXCodeCompleteResults(), Diag(new Diagnostic), + : CXCodeCompleteResults(), + Diag(new Diagnostic( + llvm::IntrusiveRefCntPtr<DiagnosticIDs>(new DiagnosticIDs))), SourceMgr(*Diag, FileMgr, FileSystemOpts) { if (getenv("LIBCLANG_OBJTRACKING")) { ++CodeCompletionResultObjects; |