Review: CLion: a great way to develop on clang

Review of CLion from JetBrains, a new C++ IDE
<https://www.jetbrains.com/clion/>
(early access build CL-140.2310.6)

Hi fellow clangers,

I wanted to share my positive experiences using CLion to work
on the clang codebase. I'm using local copies of the code checked
out from the github llvm-mirror repositories and working in my own
feature branch following a typical github workflow.

CLion understands CMake projects and even though LLVM+clang+tools-extra
is quite a pile of CMake code, CLion digests it without difficulty or
error. The IDE itself is rock-solid, which is as I'd expect from an
IDE shell based on IntelliJ which is a very stable shipping product.

The editor, project navigator and whatnot are what you'd expect from
any IDE these days. Some things that I found handy:

- filename completion while editing the CMakeLists.txt file
- excellent refactoring support
- excellent code navigation
- a "run configuration" already created for every executable target
  in the project. LLVM+clang+tools-extra creates quite a large number
  of executables, but CLion makes it easy to find the configuration of
  interest by filtering as you type when selecting a configuration.

Debugger support is on a par with gdb but with a GUI view of
local variables, watch expressions, etc. There is access to the
gdb console if you want to head straight to the debugger.

I am pretty keyboard-centric when I'm in a development session and
CLion's IntelliJ-based IDE is easy to use and allows for robust
keybinding customization if desired. I tend to use the standard
keyboard mapping and navigate through menus, etc., by the keyboard.
CLion doesn't get in my way when staying focused on the keyboard.

There's tons more I could say, but this is already too long :).
I recommend just trying an EAP build and seeing what you think.

Out of curiosity:

  • are you involved in the project?
  • is the syntax checking / code completion / refactoring in any way clang based? (quick look at the site didn’t reveal anything about its innards)

Cheers,
/Manuel

In article <CAOsfVvkheC0xN9SF4KjDM=+pofuZs-RZgcF2TfhTb=NGrP+h0Q@mail.gmail.com>,
    Manuel Klimek <klimek@google.com> writes:

Out of curiosity:
- are you involved in the project?

Am I involved with the development of CLion or affiliated with JetBrains?
No. I'm a happy use of other JetBrains products and have been waiting for
them to address C++ development for some time now.

- is the syntax checking / code completion / refactoring in any way clang
based? (quick look at the site didn't reveal anything about its innards)

I do not believe it is based on clang. Their products are written in
Java and from what I can tell they have written their own parser for
C++ in Java.

  • is the syntax checking / code completion / refactoring in any way clang
    based? (quick look at the site didn’t reveal anything about its innards)

I do not believe it is based on clang. Their products are written in
Java and from what I can tell they have written their own parser for
C++ in Java.

I had a short talk with a guy from core team some time ago and he told that they don’t use Clang, but own tool.

From any language they only need AST. And they have custom C++ parser, though it supports a bit less than clang (i.e. it can’t parse some code).

Unfortunately, CLion doesn't seem to understand any other type of project,
(make, autotools, ant, maven, scons, etc.), limiting its usefulness.

Csaba