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
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
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
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
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
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
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