Skip to content

Fix #14533, #14536 FN stlcstrConcat, stlcstrAssignment, stlcstrConstructor#8261

Open
chrchr-github wants to merge 12 commits intodanmar:mainfrom
chrchr-github:chr_14533
Open

Fix #14533, #14536 FN stlcstrConcat, stlcstrAssignment, stlcstrConstructor#8261
chrchr-github wants to merge 12 commits intodanmar:mainfrom
chrchr-github:chr_14533

Conversation

@chrchr-github
Copy link
Collaborator

No description provided.

@chrchr-github chrchr-github changed the title Fix #14533 FN stlcstrConcat with constructor call Fix #14533, #14536 FN stlcstrConcat Feb 25, 2026
@chrchr-github chrchr-github marked this pull request as draft February 26, 2026 08:47
@chrchr-github chrchr-github changed the title Fix #14533, #14536 FN stlcstrConcat Fix #14533, #14536 FN stlcstrConcat, stlcstrAssignment, stlcstrConstructor Feb 26, 2026
@chrchr-github chrchr-github marked this pull request as ready for review February 26, 2026 12:19
@sonarqubecloud
Copy link

sonarqubecloud bot commented Mar 2, 2026

return false;
const Token* obj = dot->astOperand1();
if (!obj || !obj->valueType() || !obj->valueType()->container || !obj->valueType()->container->stdStringLike)
if (!obj || !obj->valueType() || !obj->valueType()->container ||
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assume that now we will not warn for:

     QString s1 = ...;
     QString s2 = s1.c_str();

my suggestion is that we warn when the same container is used. s1 and s2 have the same container pointer. Does that sound good?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assume that now we will not warn for:

     QString s1 = ...;
     QString s2 = s1.c_str();

No, we won't warn, although that is a fixable issue.

my suggestion is that we warn when the same container is used. s1 and s2 have the same container pointer. Does that sound good?

We can do that, so we will also warn for

     wxString s1 = ...;
     wxString s2 = s1.c_str();

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants