SonarLint CLion bug with C++20 concepts

  • Operating system: Linux (Archlinux)
  • IDE name and flavor/env: CLion

SonarLint doesn’t seem able to recognize the C++20 concepts and keeps flagging every single concept as a “non-const global variable” (which is false), see the screenshot below.

How do I fix this?
Alternatively, is it somehow possible to file a bug report?


hi @jay-tux,

I think that will only happen if we aren’t detecting the right standard for C++. For example, C++17 instead of C++20.

You can enable the S2260 which detects the analyzer parsing failure to see if the analyzer is able to understand the concept keyword.

Can you make sure you have C++20 in your Clion configuration?

If you still face the issue, can you share the analysis verbose log?



Sorry for my late reply. Is it possible that CLion deduces it incorrectly if I open an (externally created) Makefile project instead of a CMake project?

I’d like to send a verbose log, but is it possible to do so in a less public environment?

It is possible if you can’t build the file through CLion.

I will send you a PM where you can share the log privately.


Hi @jay-tux,

I sent you a PM 19 days ago, but I still didn’t get the log.
Do you have any updates?