Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] LLVM Project Blog: A path forward for an LLVM toolchain on Windows

CDT would have to switch to Clang's representation of AST. The AST could still be represented by Java objects. Clang parser (probably in a separate process to protect against memory leaks) would serialize its representation of AST and CDT would deserialize it to Java. Converting Clang's AST to the current CDT AST representation is probably not practical. Changing CDT to a different AST representation is a massive undertaking that would touch a lot of code, both in core and in UI.

A potential showstopper for the whole plan is existence of such features of Clang bindings that would not allow index bindings to implement the same set of interfaces as the AST bindings. I don't know whether such features exist or not.

My 2c.


On Wed, Sep 11, 2013 at 9:49 AM, Nathan Ridge <zeratul976@xxxxxxxxxxx> wrote:
> There is no doubt LLVM is becoming a huge force. Though I'm more interested in it from the parser/indexer side. I wonder how we'd plug it in...

That's an interesting question.

For several of the parser bugs that I fixed, I looked at the C++ standard document to see what the exact behaviour should be. As I was reading parts of the standard document, a common reaction to reading many clauses was "uh... I'm pretty sure CDT's parser doesn't handle this case". I think that getting the CDT parser to implement the standard to a tee would be a huge amount of work - and yet having a very accurate parser is important, in my opinion, for features like refactoring, static analysis, and giving accurate errors.

Clang, on the other hand, comes very close to implementing the standard to a tee, and it would be really nice to be able to reuse the excellent work that clang developers have been doing (and will continue to do) in CDT. I'm not sure whether/how that's possible.


cdt-dev mailing list

Back to the top