[cfe-dev] Integrating clang-based refactoring tools into IDEs - best practices?

Kevin Funk kfunk at kde.org
Mon Jun 1 06:54:55 PDT 2015


On Saturday 30 May 2015 14:43:44 Milian Wolff wrote:
> Hello all,
> 
> for KDevelop, we have a GSOC student this summer doing a R&D project on how
> we could leverage libTooling and friends to create refactoring tools for
> C++ code. I'm pretty sure that this is the correct way in the long run, but
> I have some trouble with the lack of API and ABI stability in the C++
> libraries of LLVM, most notably libTooling here.

I just talked to a few people in #llvm and it appears that library ABI from 
x.y.0 is supposed to be same for x.y.1 and onwards. So there seems to be a ABI 
stability guarantee for patch releases. (Can someone from LLVM/Clang devs 
confirm this? Tom Stellard told me it's indeed "official")

This combined with the fact that distros usually co-install LLVM/Clang minor 
releases (3.5, 3.6, ...) should avoid us running in ABI issues, no?

I'd really appreciate if we could just use the libTooling API and share parsed 
data (somehow...) and avoid the multi-process approach altogether. Maybe 
that's indeed the better approach for our R&D project -- just use the API 
directly, don't add a wrapper (yet).

PS: Sorry I didn't step in earlier on the KDevelop mailing list, but I'm 
buried in "real" work at the moment

> I was thinking about a separate process that works only against a very
> specific LLVM version. Thus, if distributors update LLVM, and the stuff does
> not compile anymore, we only loose the refactoring but not the whole
> language support (based on clang-c).
> With this approach though, the cached parse data cannot be shared between
> language support and refactoring...
> 
> How do other IDEs handle this situation? Is there maybe an external
> libTooling-c shim or similar that we could leverage?
> 
> Bye

-- 
Kevin Funk | kfunk at kde.org | http://kfunk.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20150601/f61ee5b1/attachment.sig>


More information about the cfe-dev mailing list