mirror of
https://github.com/intel/llvm.git
synced 2026-01-23 16:06:39 +08:00
Make sure we initialize the "extra" data within the libclang code
completion context, in case we end up having no code-completion callback. Individual instances of this problem are always bugs that need to be fixed, but it's better to make sure we have initialized data here. llvm-svn: 141598
This commit is contained in:
@@ -274,7 +274,12 @@ AllocatedCXCodeCompleteResults::AllocatedCXCodeCompleteResults(
|
||||
llvm::IntrusiveRefCntPtr<DiagnosticIDs>(new DiagnosticIDs))),
|
||||
FileSystemOpts(FileSystemOpts),
|
||||
FileMgr(new FileManager(FileSystemOpts)),
|
||||
SourceMgr(new SourceManager(*Diag, *FileMgr)) {
|
||||
SourceMgr(new SourceManager(*Diag, *FileMgr)),
|
||||
Contexts(CXCompletionContext_Unknown),
|
||||
ContainerKind(CXCursor_InvalidCode),
|
||||
ContainerUSR(createCXString("")),
|
||||
ContainerIsIncomplete(1)
|
||||
{
|
||||
if (getenv("LIBCLANG_OBJTRACKING")) {
|
||||
llvm::sys::AtomicIncrement(&CodeCompletionResultObjects);
|
||||
fprintf(stderr, "+++ %d completion results\n", CodeCompletionResultObjects);
|
||||
|
||||
Reference in New Issue
Block a user