Just to clarify your title says not detected but the description says that we raise an issue.
I expect our analyzer to detect the issue. I don’t see why if constexpr is different than if when it comes to adding curly braces.
For the other post you linked, it was a false positive. In your case, it isn’t.
Hi @Abbas,
Thanks for the response. I checked again for details here.
Seems like the problem may be related to combination with lambdas. Something like this:
auto callback = [](auto param)
{
if constexpr (...)
{
// ^ SonarQube complains about missing curly braces here
}
}
Unfortunately I fail to produce the issue with IDE integration. Even at the place where the server detects the issue. So I also fail to create a small example to produce the issue.
Let’s see if findings still exists after update.
@max.sch thanks for the clarification.
No need for the manual work. If it is still there after the update, I will send you instructions to generate an automatic reproducer from the server.