Product News

CLion 2020.2 release: Makefile projects, C++20, enhanced static analysis, and doctest support

CLion 2020.2 is released!

CLion 2020.2: Makefile Projects, C++20, Enhanced Code analysis, Doctest, and Other Unit Testing Support Improvements

by Anastasia Kazakova

From the article:

CLion 2020.2 covers a wider variety of C and C++ projects and makes modern C++ coding easier. Here are the highlights:

  • Project models
    • Initial support for Makefile projects
    • CMake upgrade to 3.17
  • C++20 standard compliance
    • Code completion for C++20 keywords
    • Code completion in designated initializers
    • Support for the explicit(bool) construct in name hints, navigation, and refactorings
    • Range-based for loops with the init statement are now supported
  • Code analysis
    • A new inspection to constrain a function's result
    • Dangling pointer check
    • A more accurate Simplify inspection
    • Check for a loop condition that is never updated
    • New Inspection Widget and new Problems View
  • Support for Doctest, and improved integration with Catch2 and Google Test 1.10
  • Automatic creation of code coverage profiles
  • PlatformIO plugin enhancements
  • VCS:
    • Git installed in WSL2
    • A more helpful GitHub Pull Requests View
  • Performance improvements

DeepEnds 3.5: Make public members private

workflow.pngCycleRouter Ltd has released version 3.5 of their DeepEnds dependency analysis tool. A highlight:

Report and/or automatically rewrite public members that should be private

From the release announcement:

DeepEnds includes other dependency analysis tools to analyse coupling and cohesion, delete redundant code and

identify classes to extracted from C code. It parses C++, C# and Visual Basic source code.

The software is free to use until the end of August and will now install successfully via NuGet.

PVS-Studio: analyzing pull requests in Azure DevOps using self-hosted agents

Static code analysis is most effective when changing a project, as errors are always more difficult to fix in the future than at an early stage. We continue expanding the options for using PVS-Studio in continuous development systems. This time, we'll show you how to configure pull request analysis using self-hosted agents in Microsoft Azure DevOps, using the example of the Minetest game.

PVS-Studio: analyzing pull requests in Azure DevOps using self-hosted agents

by Alexey Govorov

From the article:

The result is a build system based on MSBuild for C++, with Chocolatey for installing PVS-Studio, CMake, and Git. Vcpkg is built for convenient management of the libraries that the project depends on. Also, we have to download the latest version of the Azure Pipelines Agent. To initialize the agent from the ENTRYPOINT Docker file, the PowerShell script 'entrypoint.ps1' is called, to which you need to add the URL of the project's "organization", the token of the agent pool, and the PVS-Studio license parameters....



Initial Support For C++20 Ranges--Casey Carter

Ready to try them?

Initial Support For C++20 Ranges

by Casey Carter

From the article:

We are happy to announce that Visual Studio 2019 version 16.6 contains the first user-visible pieces of C++20 Ranges support. We’ve been working on support machinery for a few releases now, but in this release the tip of the iceberg has finally broken the surface of the water and there are now some tools available for users. The Ranges implementation critically depends on C++ Concepts, and as such is usable with both MSVC and Clang in their C++20 Preview modes but not yet well-supported by IntelliSense. (Don’t worry, we’ll have proper IntelliSense support soon.)...

C++20 Features and Fixes in VS 2019 16.1 through 16.6--Stephan T. Lavavej

Did you get up to date?

C++20 Features and Fixes in VS 2019 16.1 through 16.6

by Stephan T. Lavavej

From the article:

We’ve been busy implementing C++20 features in MSVC’s compiler and Standard Library, and migrating the latter to microsoft/STL on GitHub – in fact, we’ve been so busy that we haven’t posted a C++ toolset changelog since the VS 2019 16.0 toolset changelog. So, here are the compiler features and STL features/fixes that have shipped for production use in the last year.

As a reminder, the /std:c++17 and /std:c++latest compiler options are necessary to use C++17 and C++20 features...

PVS-Studio is now in Compiler Explorer!

Now you can quickly and easily analyze the code for errors right on the site (Compiler Explorer). This feature opens up a large number of new possibilities – from quenching curiosity about the analyzer's abilities to being able to quickly share check results with a friend. Caution – GIFs!

PVS-Studio is now in Compiler Explorer

by George Gribkov

From the article:

If you want to see the output of your program, you can open the execution window by clicking "Add new... - > Execution only" in the code editor (not in the compiler window). In the gif below, you can see the output of the lab work taken from our page about free usage of PVS-Studio by students and teachers.

SonarQube / SonarCloud Improved Analysis -- Alexandre Gigleux

With recent releases SonarQube and SonarCloud offer expanded compiler support and additional security-related rules.

Improved C/C++ analysis

By Alexandre Gigleux

From the article:

There are tons of C/C++ compilers out there and we always get many requests by many users about additional compilers support. We listened and added the support of 10+ compilers to allow more developers to benefit from our C/C++ rules.

We want to help C/C++ developers to deliver code in production without vulnerabilities and more precisely we want to avoid buffer overflow to be exploited by hackers. This is why we implemented 4 rules looking at APIs that could be badly used and that open the door to buffer overflow attacks


ModernCppStarter & PVS-Studio Static Code Analyzer

One of the ways to improve software quality is to check source code with static analysis tools. This section explains how to use the PVS-Studio analyzer to check projects built on ModernCppStarter. We provide a free license for open-source projects.

ModernCppStarter & PVS-Studio Static Code Analyzer

by PVS-Studio Team

From the article:

plog-converter will convert the report into the errorfile format (similar to GCC's messages), which can be conveniently viewed in a terminal window and the IDE. You can also have the report converted to an HTML file by using the -t fullhtml flag. Use the flags -a and -d to filter diagnostics. Run the plog-converter --help command to view the full list of available options.


Transforming C to C++

New video on using the latest version of DeepEnds.

Transforming C to C++

by Zeb Mason

About the video:

Performs a clustering analysis on a C call graph then manipulates it within Visual Studio to prototype a class.

Creating traditional Visual Studio sln from CMake

CMakeToVisualStudio parses CMake files to create a Visual Studio solution.


by Zeb Mason

About the release

CMakeToVisualStudio parses CMakeLists.txt and CMakeCache.txt files and creates a traditional Visual Studio solution from templated XML:

  • Might not build properly
  • Might be sufficient to work with historical tooling for Visual Studio
  • LGPL v2.1 set of libraries for reading CMake and Visual Studio projects and writing Visual C++ solutions