Reputation: 52799
The clang C++ compiler claims to be built for, among other things, better IDE integration by providing an API for the IDE to use for tasks such as parsing the code.
So, are there are any good C++ IDE's that use clang to provide features such as semantic highlighting, refactoring, and finding and showing semantic errors in real-time?
I've been using Eclipse CDT, but its C++ parser is full of imperfections that cause the IDE to report a lot of annoying false positive errors in the code. I would like to have an IDE that reports an error if and only if the compiler would report the same error, hence my interest in an IDE that's built on a compiler's internals.
I'm primarily interested in cross-platform IDE's, although I wouldn't mind knowing about single-platform ones for Windows or Linux (so not Xcode), as long as they are FOSS (another reason why not Xcode).
Upvotes: 44
Views: 19006
Reputation: 76720
Qt Creator is basing their next-gen code parsing and associated functionality on Clang:
https://www.qt.io/blog/2011/10/19/qt-creator-and-clang
Looks very, very promising!
Upvotes: 17
Reputation: 383816
jucipp
~900 stars on GitHub in 2019Q2: https://github.com/cppit/jucipp
Now moved to GitLab: https://gitlab.com/cppit/jucipp
Clearly advertises libclang backend as a main feature.
Upvotes: 0
Reputation: 916
KDevelop now has clang based c and c++ support, including semantic analysis and autocomplete. It is primarily for linux but (as of October 2016) has a beta release out for windows and mac as well.
For emacs there are irony-mode and rtags that provide features such as auto-complete, on fly error checking and jump to symbol. When combined with cmake-ide they are very powerful tools and one well versed in emacs can be highly productive in this environment.
Upvotes: 3
Reputation: 52799
A relevant new development in this area in the Language Server Protocol (LSP) project, which aims to be a language-agnostic API that allows editors / IDEs to be decoupled from backends that provide code intelligence / analysis.
There is ongoing work to create a clang-based C++ backend called Clangd.
There is also ongoing work on several editors / IDEs to support the LSP as a client.
Once the backend implementation matures, all editors supporting the LSP will, in principle, be able to leverage clang's capabilities as exposed through Clangd.
Upvotes: 3
Reputation: 52799
gedit isn't really an IDE, but there is a plugin for it that provides code assistance using clang
Upvotes: 4
Reputation: 768
Not FOSS, but JetBrains (of IDEA and ReSharper fame) are building out their AppCode product into a full C++ IDE supporting Win/Linux/Mac and using clang.
Upvotes: 0
Reputation: 507
It seems that CodeLite v3.5 starts supports Clang natively. However I haven't found is it possible to setup LLVM as backend.
Upvotes: 3
Reputation: 104698
have you tried clang complete?
if you're punk rock, then vim is enough ide ;)
i often work with xcode so... can't really share firsthand experience, but i knew of its existence.
Upvotes: 4