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
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user