Erroneous cpp:S916 With Branch Hint

When a switch statement’s label has a C++20 branch hint attribute, a cpp:S916 false positive is emitted. For example:

switch (foo) {
    [[likely]] default: break;

OS=Win10 Pro, plugin version=, not connected (?)

Additionally, it would be nice if there were a more direct way to submit bug reports (or at least more obvious, if there is already one), albeit I must say I’m impressed with the powerfulness per bugginess ratio so far.

Hi @geometrian,

Thank you for reporting this false positive (and for your estimation of our powerfulness per bugginess ratio). You are on the right channel to report such issues (we prefer creating Jira tickets ourselves, it allows us to first analyze what the issue is about).

I created a ticket to follow it, and started to work on it.

For your information, the ticket is done, and our next releases should contain this fix.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.