I would be interested in your complete case because I don’t understand how the generated code ends up resembling this.
Would you mind generating a reproducer file so that we can analyze it?
Either through SonarQube:
Search in the analysis log for the full path of the source file for which you want to create a reproducer (the one in the screenshot). You will have to use exactly this name (same case, / or \…)
Add the reproducer option to the scanner configuration: sonar.cfamily.reproducer="Full path to the .cpp"
Re-run the scanner to generate a file named sonar-cfamily.reproducer in the project folder.
Please share this file. If you think this file contains private information, let us know, and we’ll send you a private message that will allow you to send it privately.