[clangd] Do not build AST if no diagnostics were requested
authorIlya Biryukov <ibiryukov@google.com>
Tue, 31 Jul 2018 13:45:37 +0000 (13:45 +0000)
committerIlya Biryukov <ibiryukov@google.com>
Tue, 31 Jul 2018 13:45:37 +0000 (13:45 +0000)
commitec9bd36f2d13d2afad0150d16e68039ec8511222
treea5a024fac7a2d1d590f766a7198a081f3c101ed5
parent70997f9a4e4064f5ce157c63313b6b9e09081ac3
[clangd] Do not build AST if no diagnostics were requested

Summary:
It can be removed from the cache before the first access anyway, so
building it can be a waste of time.

Reviewers: ioeric

Reviewed By: ioeric

Subscribers: javed.absar, MaskRay, jkorous, arphaman, cfe-commits

Differential Revision: https://reviews.llvm.org/D49991

llvm-svn: 338378
clang-tools-extra/clangd/TUScheduler.cpp