[PATCH] D47331: [clangd] Remove accessors for top-level decls from preamble

2018-05-28 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rCTE71: [clangd] Remove accessors for top-level decls from preamble (authored by ibiryukov, committed by ). Changed prior to commit: https://reviews.llvm.org/D47331?vs=148605&id=148806#toc Repository

[PATCH] D47331: [clangd] Remove accessors for top-level decls from preamble

2018-05-25 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov updated this revision to Diff 148605. ilya-biryukov added a comment. - Rewrote findDecl, it will deserialize decls if needed now Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D47331 Files: clangd/ClangdUnit.cpp clangd/ClangdUnit.h clangd/XRefs.cpp unittest

[PATCH] D47331: [clangd] Remove accessors for top-level decls from preamble

2018-05-25 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added inline comments. Comment at: clangd/ClangdUnit.h:81 ASTContext &getASTContext(); const ASTContext &getASTContext() const; ioeric wrote: > IIUC, `ASTContext` in a `ParsedAST` may not contain information from > preambles and thus may gi

[PATCH] D47331: [clangd] Remove accessors for top-level decls from preamble

2018-05-25 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov updated this revision to Diff 148602. ilya-biryukov marked 3 inline comments as done. ilya-biryukov added a comment. - Rename the field in addition to the getter - Address review comments Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D47331 Files: clangd/ClangdU

[PATCH] D47331: [clangd] Remove accessors for top-level decls from preamble

2018-05-25 Thread Eric Liu via Phabricator via cfe-commits
ioeric added a comment. Nice! This looks good to me. Just some nits. I'll let Sam stamp. Comment at: clangd/ClangdUnit.h:81 ASTContext &getASTContext(); const ASTContext &getASTContext() const; IIUC, `ASTContext` in a `ParsedAST` may not contain informa

[PATCH] D47331: [clangd] Remove accessors for top-level decls from preamble

2018-05-25 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. Wow, nice! Just unsure about the test helper. (We can rewrite it in another way if needed) Comment at: clangd/ClangdUnit.h:88 - /// This function returns all top-level decls, including those that come - /// from Preamble. Decls, coming from Preamb

[PATCH] D47331: [clangd] Remove accessors for top-level decls from preamble

2018-05-24 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov created this revision. ilya-biryukov added reviewers: ioeric, sammccall. Herald added subscribers: jkorous, MaskRay, mehdi_amini, klimek. They cause lots of deserialization and are not actually used. The ParsedAST accessor that previously returned those was renamed from getTopLevelDe