[clangd] Don't treat top-level decls as "local" if they are from the preamble.
authorSam McCall <sam.mccall@gmail.com>
Fri, 9 Nov 2018 15:35:00 +0000 (15:35 +0000)
committerSam McCall <sam.mccall@gmail.com>
Fri, 9 Nov 2018 15:35:00 +0000 (15:35 +0000)
commit9ac2f7a1f826b0b72e6d86836d523808eaa3563c
tree1807211980684b796e1222ae5d4f7761e9910cde
parentf3cae3ab4c45ed95b5f1494b81e1fbe433d8ae74
[clangd] Don't treat top-level decls as "local" if they are from the preamble.

Summary:
These get passed to HandleTopLevelDecl() if they happen to have been
deserialized for any reason. We don't want to treat them as part of the
main file.

Reviewers: ilya-biryukov

Subscribers: ioeric, MaskRay, jkorous, arphaman, kadircet, cfe-commits

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

llvm-svn: 346503
clang-tools-extra/clangd/ClangdUnit.cpp
clang-tools-extra/unittests/clangd/ClangdUnitTests.cpp