CLion 2018.2 EAP: clangd as an additional C++ language engine
A new CLion 2018.2 EAP (build 182.3458.13) is now available! As usual, a patch-update will be available shortly for those using the previous EAP build, and you can also use Toolbox app or snap packages (in the case of Ubuntu) to get this build.
No license is required and the build is free to use, but it will expire within 30 days of the build date.
In brief, in this build clangd is available as an additional C++ language engine in CLion. It’s turned on by default on all platforms (on Linux and macOS – in v2018.2, on Windows – in v2018.2.1) and is used for showing code errors and warnings in the CLion editor. This feature is experimental, which means we can not guarantee it will make it to the official CLion 2018.2 release.
And now let’s talk about it in details.
CLion provides rich code insight abilities for C and C++ code. All these refactorings, code completion, code generation, code analysis, and other features are working on the language engine which CLion provides. We constantly work on making the language support in CLion more accurate and knowledgeable about modern C++ language features. As part of this goal, we now would like to give clangd, a popular Clang-based language engine, a try as an additional C++ language engine.
Two is better than one
Nowadays Clang is definitely the most accurate solution in terms of correct C++ code parsing and resolve. However in its current state it can’t support all the code insight features we’d like to provide in CLion. So we’ve decided to keep both language engines working at the same time.
How my IDE is affected?
Let’s talk about how the change affects CLion:
- When enabled, clangd is used to show code errors and warnings in the CLion editor. CLion’s own code errors are turned off in this case (some warnings are still there).
- Default configuration includes many compiler warnings, unless you turned them off manually in settings.
- Quick-fixes are provided by the CLion’s own engine.
- The rest of the code insight features are not affected (i.e. code highlighting, refactorings, completion, navigation is still working on top of the CLion’s own language engine).
Clangd settings are available in Settings/Preferences | Languages & Frameworks | C/C++ | Clangd:
Here you can turn on/off the clangd as errors/warnings provider and configure the Clang warnings set.
Known issues and limitations
Here is the list of the issues and current limitations known to us. If you notice anything else disturbing you, please report to our issue tracker.
- In some cases the quick-fixes might be provided by CLion with a noticable delay after the error shown by clangd.
- Code | Inspect Code… action uses CLion C++ language engine. So the result may be different from what you see in the editor (as it works via clangd).
- Complete Statement for incomplete code doesn’t work in most cases when errors from clangd are enabled (CPP-13412).
- Some other issues: CPP-13312, CPP-13482, CPP-13484.
Full release notes are available by the link.
Your CLion Team
The Drive to Develop
Subscribe to Blog updates
Thanks, we've got you!
CLion 2023.3 EAP2: Support for Device Tree Files and Meson
The CLion 2023.3 Early Access Program has just started, featuring assembly view for files, enhanced C++ data flow analysis, and other updates. The CLion 2023.3 EAP2 build is ready for you to try! With it, you can finally start working on Meson projects in CLion and benefit from device tree format s…
The CLion 2023.3 Early Access Program Is Open
We recently shared our preliminary plans for v2023.3, which we plan to release at the end of November. We are now happy to announce that the CLion 2023.3 Early Access Program (EAP) starts today! Our EAP lets the community participate in discussions devoted to our products and influence the developm…
CLion 2023.2 Release Candidate
CLion 2023.2 is on its way, while the release candidate for v2023.2 is already available! To install CLion 2023.2 RC (build 232.8660.139), download it from the website, update via the Toolbox App, or use this snap package (for Ubuntu). Please note, you need an active subscription or a trial lice…
CLion 2023.2 Goes Beta
The Beta version of CLion 2023.2 is now available with the key improvements and changes that are expected in the upcoming release. Download build 232.8660.49 from our website, via the Toolbox App, or as a snap package (for Ubuntu). DOWNLOAD CLION 2023.2 BETA Text search in Search Everywhere Searc…