[cfe-dev] [RFC] A C++ pseudo parser for tooling

Demi Marie Obenour via cfe-dev cfe-dev at lists.llvm.org
Tue Nov 9 10:30:28 PST 2021


On 11/9/21 1:03 PM, Sam McCall wrote:
>> Could an index be persisted to disk, reloaded at startup
> 
> (Clangd does have this too, FWIW)
> 
> 
>> and incrementally changed as the user edits?
> 
> User edits mean we need to parse new code.
> Absent a pseudoparser, the only thing that parses code is clang.
> Clang needs a full AST, so this step is slow.

What I meant is that clang could reparse only the code the user has
edited, rather than reparsing the entire source file from scratch.
I believe rust-analyzer does exactly this for Rust source, and my
understanding is that it is considered fast enough.  That said,
this could require significant refactoring of clang.

Sincerely,
Demi Marie Obenour (she/her/hers)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_0xB288B55FFF9C22C1.asc
Type: application/pgp-keys
Size: 4874 bytes
Desc: OpenPGP public key
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20211109/420f1ecb/attachment-0001.key>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20211109/420f1ecb/attachment-0001.sig>


More information about the cfe-dev mailing list