Commit Graph

11 Commits

Author SHA1 Message Date
Fangrui Song
99930623ef Set RetainCommentsFromSystemHeaders to true
Note with -fretain-comments-from-system-headers, the .gch of bits/stdc++.h becomes larger by 1%, but that is fine.

And improve comment handling in textDocument/hover

Fix #373
2019-05-13 00:26:55 -07:00
Fangrui Song
b69f62c2bc Set RetainRemappedFileBuffers to true
Reported by David Welch in #350.

This fixes double-free of llvm::MemoryBuffer when parsing fails.
2019-05-13 00:26:55 -07:00
Fangrui Song
a41b976a77 Adapt clang rC357037: removal of setVirtualFileSystem 2019-05-13 00:26:55 -07:00
Leszek Swirski
3a252fc0ad Use DiagnosticRelatedInformation if client supports publishDiagnostics.relatedInformation (#276)
In clients that support DiagnosticRelatedInformation, display
clang notes as these nested diagnostics rather than appending
them to the parent diagnostic's message. Behaviour for clients
that don't support related information should be unchanged.
2019-05-13 00:26:46 -07:00
Fangrui Song
0dbf6c89f1 Drop support for clang 6 2019-03-17 18:50:25 -07:00
Fangrui Song
d6329ea328 completion: if preamble size changes, rebuild it
Fix #190

If a new header is added, the preamble size changes. Language clients may cache completion results, thus we rebuild preamble to avoid inaccurate results.
2019-03-17 18:50:25 -07:00
Fangrui Song
e8cacf1efa Adjust FrontendOpts.Inputs[0] for inferred files 2019-03-17 18:50:25 -07:00
Fangrui Song
cbd36aeedb Handle file deletion and register workspace/didChangeWatchedFiles
* In the "initialized" callback, send client/registerCapability with DidChangeWatchedFilesRegistrationOptions
* In workspace/didChangeWatchedFiles callback, call pipeline::Index
* In pipeline::Index, add a `deleted` status
2019-03-17 18:50:25 -07:00
Fangrui Song
8ca0978804 Make -v=1 work and log cflags for SemaManager session and Indexer 2019-01-12 00:40:49 +08:00
Fangrui Song
df7221affc Rendezvous after receiving "exit" notification (#159) 2019-01-12 00:40:49 +08:00
Fangrui Song
ab48663ca0 Refactor WorkingFiles and CompletionManager
* WorkingFiles::files : vector -> unordered_map
* Add timestamp to WorkingFile

* Rename "comp-preload" thread to "preamble"
* Rename CompletionManager to SemaManager as it is used by "diag" "comp" "preamble"
* Rename clang_complete.* to sema_manager.*
* Merge SemaManager::{preloads,sessions}
* Add initialization option session.maxNum
* In DiagnosticMain, if an included file was modified, cancel the DiagTask and create a PreambleTask instead. The task sets `from_diag` so as to trigger immediate DiagTask after the preamble is built.
2019-01-12 00:40:49 +08:00