summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/clangd/AST.cpp
diff options
context:
space:
mode:
authorSam McCall <sam.mccall@gmail.com>2018-11-26 09:51:50 +0000
committerSam McCall <sam.mccall@gmail.com>2018-11-26 09:51:50 +0000
commit6e2d2a33b6be376e52688705db22534b336f5529 (patch)
tree1e7ed4997044b9a0784a97d8da0d945a05574616 /clang-tools-extra/clangd/AST.cpp
parentdbfa9c3e0a34807489d31fca7dac3de5c1e0446d (diff)
downloadbcm5719-llvm-6e2d2a33b6be376e52688705db22534b336f5529.tar.gz
bcm5719-llvm-6e2d2a33b6be376e52688705db22534b336f5529.zip
[clangd] Auto-index watches global CDB for changes.
Summary: Instead of receiving compilation commands, auto-index is triggered by just filenames to reindex, and gets commands from the global comp DB internally. This has advantages: - more of the work can be done asynchronously (fetching compilation commands upfront can be slow for large CDBs) - we get access to the CDB which can be used to retrieve interpolated commands for headers (useful in some cases where the original TU goes away) - fits nicely with the filename-only change observation from r347297 The interface to GlobalCompilationDatabase gets extended: when retrieving a compile command, the GCDB can optionally report the project the file belongs to. This naturally fits together with getCompileCommand: it's hard to implement one without the other. But because most callers don't care, I've ended up with an awkward optional-out-param-in-virtual method pattern - maybe there's a better one. This is the main missing integration point between ClangdServer and BackgroundIndex, after this we should be able to add an auto-index flag. Reviewers: ioeric, kadircet Subscribers: MaskRay, jkorous, arphaman, cfe-commits, ilya-biryukov Differential Revision: https://reviews.llvm.org/D54865 llvm-svn: 347538
Diffstat (limited to 'clang-tools-extra/clangd/AST.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud