CLion 2021.1 release: global data flow analysis, improvements for remote work, postfix autocompletion

Hello, Habr!





JetBrains has started a new release year: all our desktop products have been updated or will be updated in the very near future. Today we want to talk about CLion 2021.1, the latest version of our cross-platform IDE for C and C ++ development.





:













    • Clazy





    • MISRA









    • Makefile

















  1. (CMake, Makefile, Qt)





  2. C C++









  3. IntelliJ





30 . CLion All Products Pack, 2021.1. , .





2021.1 .





โ€” , , . (dangling pointer), (null dereferencing), , (, , , , โ€” , ) .





โ€” . (DFA) CLion , 2020 Clang . 2021 , . ?





  • . CLion 2020.3 .





  • (TU), . , CLion 2021.1.





, :





:





:





  • โ€” , .





  • โ€” , .





  • โ€” , .





, , . ( , ), . () .





, Lifetime-. -, , !





Clazy

Qt-. , QML :( Clang Clazy โ€” Qt. CLion :





Settings/Preferences | Editor | Inspections | C/C++ | General | Clazy. level โ€” Clazy. CLion 2021.1 CLazy 1.8.





MISRA

CLion MISRA C 2012 MISRA C++ 2008. , , .





MISRA AUTOSAR.





- :





Makefile

CLion 2021.1 Makefile. , Settings/Preferences | Build, Execution, Deployment | Makefile .





โ€” . , Makefile. .





IDE , , Google Sanitizers, Valgrind Memcheck . , , ( ).





, CLion :





  1. (Line coverage) โ€” , GCC/gcov. , , return 0; int c;



    100%.





  2. (Statement coverage) โ€” , LLVM/llvm-cov. , , , 100% .





  3. (Branch coverage) โ€” GCC/gcov, LLVM/llvm-cov 12.0.0. , GCC/gcov , , LLVM/llvm-cov โ€” . gcov 100% ยซโ€Ž ยปโ€Ž, , , - .





- ( ). , CLion ssh- . , ( , IDE ). . Tools | Open Remote Host Terminal . , โ€” , .





Code With Me โ€” . , . :





  1. , .





  2. CLion 2021.1 .





  3. , Code with Me , .





  4. : - , , , .





CLion , . !





(CMake, Makefile, Qt)

Makefile Clazy Qt. CLion 2021.1 .





CMake

CMake 3.19 (, , Apple Silicon โ€” M1. CMake 3.20 โ€” CLion 2021.1, CMake CLion.





CMake, IDE, VCS. Share Settings/Preferences | Build, Execution, Deployment | CMake, cmake.xml . : CMake Presets , (CPP-22906).





Makefile

Makefile โ€” . , CLion Makefile Language, . make



, , Find Usages , Makefile.





Qt

Clazy, Qt- โ€” Qt UI Class:





.





QtCreator.





:





C C++

C C++ (UFCS)? ! C C++ . , :





:





, . Settings/Preferences | Editor | General | Postfix Completion.





, :





:





  • sysroot. , .





  • LLDB , , ( ). GDB, LLDB.





Set Execution Point C/C++, :





. , .





IntelliJ

ยซยป CLion IntelliJ. , , :





  • ,





  • Git-





  • Save to Shelf .





CLion Rust-. IntelliJ Rust โ€” . , Change Signature , Find Usages Cargo.





Swift. : โ€œ CLion, AppCode!?โ€ , AppCode Mac, Swift Ubuntu, Windows. Swift Windows โ€” , . AppCode. , Swift Windows, Appcode.





. , CLion, .





! , โ€” , , !





CLion

The Drive to Develop








All Articles