False positive for cpp:S1116

Version: 9.1 (build 47736)
The rule has an exception which I believe needs expanding: In the case of empty expanded macro and in the case of 2 consecutive semi-colons when one of the two is part of a macro-definition then the issue is not raised.

The code:

#include <iostream>

#define A_MACRO(string)\
  std::cout << "Here is a macro that says " string << std::endl;\

int main()
  A_MACRO("something interesting");
  return 0;

SonarQube raises the issue on the invocation of A_MACRO. The code uses a standard idiom for a multi-line macro, which places the code in the macro within curly braces. I believe the exception to the rule should be expanded to include this, as it would look strange to invoke the macro without a semicolon on the line.

Hi @obi ,
Thanks for reporting this point!
I created a ticket to follow up on this false positive.