[PATCH] D31328: [clangd] Add code completion support

Marc-Andre Laperle via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Mar 27 16:14:54 PDT 2017


malaperle-ericsson added a comment.

Ideas/Observations:

- One thing I has done in my version is to introduce "ASTUnitRunnable", a lambda function type that has an ASTUnit as parameter and is executed by the ASTManager. So the ASTManager takes care of locking the AST but the actual code using the AST is kept in the ProtocolHandlers. I think this can be refactored later if this is seen as a good approach.
- I have noticed while testing that there is some wrong escaping happening. I had typed "รน" by mistake (french keyboard layout!) and it threw an error about unexpected \x. I think using yaml::escape is not entirely correct. This can be addressed in a different patch because it affects other protocol handlers as well (diagnostics, etc).
- I noticed that "file://" is stripped from file:///path but not "file:" in file:/path, I think it's the Eclipse client that's wrong here.

But I don't see any immediate need to change anything in this patch.


https://reviews.llvm.org/D31328





More information about the cfe-commits mailing list