6 new rules about C++20's concepts and flexible array members support in bug detection

Hello dear C, C++ and Objective-C users.

We are glad to bring you 6 rules to use better one of the most significant features in C++20: concepts.

  • Rule S6456: Requires-expression should not contain unevaluated concept checks or type predicates
  • Rule S6458: Perfect forwarding constructors should be constrained
  • Rule S6459: Type-constraints should not be used for forwarding reference parameters
  • Rule S6460: Template should not be constrained with ad-hoc requires-expression
  • Rule S6461: “std::declval” should not be used within requires-expression
  • Rule S6462: Generic iterator-based algorithms should be constrained

Our bug detection rules also added support for flexible array members. As a result, you will see a significant drop in false positives related to buffer overflow bugs.

All these will be available with SonarQube 9.8 starting from Developer Edition and is available right now on SonarCloud .


1 Like