CLion 2017.2 EAP: fixes in C++ parser and Clang-Tidy integration, C++17 in the New Project wizard and more

Anastasia Kazakova

Hi,

Meet our new CLion 2017.2 EAP (build 172.3095.8)!

Clang-Tidy integration improvements

CLion 2017.2 EAP started with the Clang-Tidy integration. Clang-Tidy warnings are shown the same way as CLion’s own built-in code inspections. Similarly you can use Alt+Enter to apply Clang-Tidy quick-fixes where available.
This EAP build fixes some issues related to this integration:

  • CLion used to continue highlighting the code and showing the warning for a couple of seconds after the quick-fix was applied. This is partially fixed now. The problem only left for the cases when the fix and the warning are located in various lines, or when the user calls Undo for a quick-fix.
  • False inspection is fixed (CPP-9404).
  • Clang-Tidy checks invoked from CLion are now generally more accurate (CLion now passes proper compilation settings, user and system headers, and other information to Clang-Tidy).

C++ support

This build provides fixes for:

  • Issue with constructor inheritance with using and type alias names (CPP-2807).
  • False warning about parameter type mismatch for const boost::optional<int> and int (CPP-5852).
  • And a couple of regressions introduced recently (CPP-9834, CPP-9991).

Performance

We continue our work on performance improvements in CLion. This EAP build brings fixes for laggy Enter and Backspace handle on some projects (when, for example, cursor enters a new block, moves to a new line and causes the code indent).

And more

C++17 is just around the corner. Besides, CLion now includes bundled CMake 3.8, that supports set(CMAKE_CXX_STANDARD 17) command to set C++17 for the project. Therefore we’ve added C++17 option to the list of standards in the New Project… wizard:cpp17_new_project
The corresponding set command will be added to CMakeLists.txt generated for your new project in this case.

Check the full release notes here.


Download CLion 2017.2 EAP

Your CLion Team
The Drive to Develop

Comments below can no longer be edited.

13 Responses to CLion 2017.2 EAP: fixes in C++ parser and Clang-Tidy integration, C++17 in the New Project wizard and more

  1. Henry Borchers says:

    June 21, 2017

    I love that you have project templates. Project templates can save a lot of time getting started. I just have one question. I’m no expert on CMake but I’ve been trying very hard to get good at it.

    In your templates, you set the CXX_STANDARD variable. Wouldn’t it make more sense set the target property instead so this value doesn’t affect any sub-projects or 3rd party libraries? The first thing I do whenever starting a new project in CLion is to replace the set(CMAKE_CXX_STANDARD 11) to set_target_properties(Foo PROPERTIES CXX_STANDARD 11)

    I’m no expert in CMake but I believe I’ve read that it’s the modern way.

    This is more of a question than critique so please correct me if I’m wrong.

    • Anastasia Kazakova says:

      June 21, 2017

      You might be right, we plan to revalidate and maybe update the CMake templates when we have some resources for that.
      BTW, some good talk on modern CMake, that might look interesting to you as well – https://www.youtube.com/watch?v=bsXLMQ6WgIk

      • Henry Borchers says:

        June 21, 2017

        Thanks Anastasia. It’s funny that you pointed to that video because it’s my favorite one on internet right now.

        Looking at it right now. I’m actually the top comment on that video. How funny.

  2. John Harris says:

    June 21, 2017

    In today’s release, extract variable seems to be broken. I’m seeing some simple extractions just silently
    not work after typing the name of the variable and pressing enter, even though they look right while typing the variable name.

    • Anton Makeev says:

      June 21, 2017

      Could you please attach/provide a link to the idea.log file? (Help | Show Log in…)

  3. Sebastian says:

    June 22, 2017

    I am recently getting quite a few errors, for example today I have seen a lot of these:

    null
    java.lang.StackOverflowError
    at com.intellij.psi.util.PsiTreeUtil.firstChild(PsiTreeUtil.java:1019)
    at com.jetbrains.cidr.lang.util.OCElementUtil.getTextFromLeaves(OCElementUtil.java:1128)
    at com.jetbrains.cidr.lang.util.OCElementUtil.getIdentifierName(OCElementUtil.java:1428)

    Is there a known issue that causes this?

    • Sebastian says:

      June 23, 2017

      Can I view error reports which I submit via CLions build-in reporting function in YouTrack?

      • Anastasia Kazakova says:

        June 23, 2017

        Unfortunately no, have you submitted one there?

      • Anastasia Kazakova says:

        June 25, 2017

        We can’t find the report quickly. To speed up the investigation, maybe it’s possible to reproduce and share the full dump here or in https://youtrack.jetbrains.com/issues/CPP?

  4. beimingkun says:

    June 26, 2017

    Hi, when will 2017.2 be finally released? I have been looking forward to this for months!

    • Anastasia Kazakova says:

      June 26, 2017

      The plan is to release in July/Aug

  5. Marco Massenzio says:

    August 13, 2017

    Regarding support for C++17, how does one go about using `std::optional` and `std::variant`?

    If I create a brand new C++17 hello world project, when I try to use `#include ` I get a file not found error: is there a way to add the necessary headers?
    (if not, can you suggest how to install them: Ubuntu 16.04).

    Thanks.

    • Anastasia Kazakova says:

      August 15, 2017

      You maybe need to use experimental::optional and #include (depending on your compiler version)

Subscribe

Subscribe for updates