[PATCH] D31019: [clangd] [RFC] Use libclang and CXTranslationUnit instead of ASTUnit

2017-03-16 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle-ericsson abandoned this revision.
malaperle-ericsson added a comment.

Abandoned because of wrong approach.


Repository:
  rL LLVM

https://reviews.llvm.org/D31019



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D31019: [clangd] [RFC] Use libclang and CXTranslationUnit instead of ASTUnit

2017-03-16 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle-ericsson added a comment.

Perfect. Thanks a lot for the explanation!


Repository:
  rL LLVM

https://reviews.llvm.org/D31019



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D31019: [clangd] [RFC] Use libclang and CXTranslationUnit instead of ASTUnit

2017-03-16 Thread Benjamin Kramer via Phabricator via cfe-commits
bkramer added a comment.

libclang is supposed to be used for bindings to other languages (it's a pure C 
interface) and its stable. ASTUnit is the C++ side of libclang, libclang is 
just a thin wrapper around ASTUnit. ASTUnit itself suffers from lots of 
technical debt because clang changed since ASTUnit was created and ASTUnit was 
never refactored to accommodate that.

Even in the current state using ASTUnit gives you more control over clang, e.g. 
it lets you use the VFS which is not exposed in libclang. At some point we're 
going to need a cleaner replacement for ASTUnit, but currently it's the only 
place in clang that supports the precompiled preamble needed for speedy code 
completion.


Repository:
  rL LLVM

https://reviews.llvm.org/D31019



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D31019: [clangd] [RFC] Use libclang and CXTranslationUnit instead of ASTUnit

2017-03-16 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle-ericsson added a subscriber: bkramer.
malaperle-ericsson added a comment.

In https://reviews.llvm.org/D31019#702631, @bkramer wrote:

> It's not. the goal is to get rid of ASTUnit inside of clangd in the long term 
> as it's a big problem for extensibility. libclang is just a wrapper for 
> ASTUnit, with even more problems.
>
> If you want to get completion running, just call ASTUnit::CodeComplete.


Thanks a lot. When you say the goal is to get rid of ASTUnit, what would it be 
replaced with? Also, why would one use libclang over ASTUnit (libclangFrontend) 
then? Perhaps there's some documentation listing the pros and cons?


Repository:
  rL LLVM

https://reviews.llvm.org/D31019



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D31019: [clangd] [RFC] Use libclang and CXTranslationUnit instead of ASTUnit

2017-03-16 Thread Benjamin Kramer via Phabricator via cfe-commits
bkramer resigned from this revision.
bkramer added a comment.

It's not. the goal is to get rid of ASTUnit inside of clangd in the long term 
as it's a big problem for extensibility. libclang is just a wrapper for 
ASTUnit, with even more problems.

If you want to get completion running, just call ASTUnit::CodeComplete.


Repository:
  rL LLVM

https://reviews.llvm.org/D31019



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D31019: [clangd] [RFC] Use libclang and CXTranslationUnit instead of ASTUnit

2017-03-15 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle-ericsson added a comment.

Just to make things clear, I'm really not sure if this is the right approach 
and I'm looking for opinions before going further in that direction (code 
completion).


Repository:
  rL LLVM

https://reviews.llvm.org/D31019



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits