Clang

Alexandre Courbot gnurou at gmail.com
Fri May 3 08:16:02 UTC 2013


On Fri, May 3, 2013 at 8:48 AM, Milian Wolff <mail at milianw.de> wrote:
> On Friday 03 May 2013 06:40:59 Alexander Mezin wrote:
>> Hello.
>> Were there any work on using clang for code completion/syntax checking in
>> KDevelop?
>
> Yes. But its not that simple. Long term though we definitely want to use it
> instead of our hand written code.
>
> http://quickgit.kde.org/?p=scratch%2Folivierjg%2Fkdev-clang.git

I also started playing around with the idea some time ago to have a C
parser that did not think my code was C++:

https://github.com/Gnurou/kdevelop/tree/clang

It's a bit messy, but syntax and error highlighting works, as well as
show uses (not all the time though). I wanted to advertise this on
this list for months but never took the time to arrange a short demo
video. Don't bother trying to use it for production though, it does
not handle includes or C++ yet.

Didn't know about Olivier's work, that looks very promising. Does
someone knows what works as of now? It seems like Olivier is using the
highly volatile C++ interface to CLang. That's what I also did
initially, but eventually I switched to the libclang C interface -
it's stable and simpler to use, and does not require static linking.

Anyway, very glad to hear that the long-term plan is to switch to
CLang for C(++)(11) parsing, last time we discussed this there was
some resistance but I strongly believe this is the way to do. If there
is official active effort to bring CLang goodness to KDevelop, I'd
love to help.

Alex.


More information about the KDevelop-devel mailing list