Commit Graph

14 Commits

Author SHA1 Message Date
Fangrui Song
a655ca966d indexer: disable warnings and skip processed function bodies
Adapt clang rC370337: removal of createIndexingAction and WrappingIndexAction
2019-11-09 20:09:13 -08:00
Fangrui Song
91abea080b 💥 Rename FunctionName -> functionName, VarName -> var_name 2019-11-09 20:09:13 -08:00
Fangrui Song
6d0a096272 Adapt rL364464: clang::FrontendAction::Execute returns llvm::Error instead of bool 2019-11-09 20:09:13 -08:00
Fangrui Song
7f291c6dd5 Set Diag::concerned if any of its Notes is concerned 2019-11-09 20:09:13 -08:00
Fangrui Song
1d3fba276f Set RetainRemappedFileBuffers to true
Reported by David Welch in #350.

This fixes double-free of llvm::MemoryBuffer when parsing fails.
2019-11-09 20:09:13 -08:00
Fangrui Song
193eacc837 Adapt clang rC357037: removal of setVirtualFileSystem 2019-11-09 20:09:13 -08:00
Leszek Swirski
7e0d8a4357 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-11-09 20:09:13 -08:00
Fangrui Song
6a517223eb Drop support for clang 6 2019-11-09 20:09:13 -08:00
Fangrui Song
c37417b436 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-11-09 20:09:13 -08:00
Fangrui Song
dd74d03cfc Adjust FrontendOpts.Inputs[0] for inferred files 2019-11-09 20:09:13 -08:00
Fangrui Song
52e0289245 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-11-09 20:09:13 -08:00
Fangrui Song
3edda5cf76 Make -v=1 work and log cflags for SemaManager session and Indexer 2019-11-09 20:09:13 -08:00
Fangrui Song
20e0beb9f3 Rendezvous after receiving "exit" notification (#159) 2019-11-09 20:09:13 -08:00
Fangrui Song
9ad2450009 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-11-09 20:09:13 -08:00