Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #12203 false negative: constParameterReference when taking address #5682

Merged
merged 5 commits into from
Nov 22, 2023

Conversation

chrchr-github
Copy link
Collaborator

No description provided.

@pfultz2
Copy link
Contributor

pfultz2 commented Nov 20, 2023

I wonder why we dont just do isVariableChanged with indirect=1 for the address of.

@chrchr-github
Copy link
Collaborator Author

chrchr-github commented Nov 20, 2023

I wonder why we dont just do isVariableChanged with indirect=1 for the address of.

That solves a couple TODOs but causes a FP for

        check("void f(int& i) {\n"
              "    new (&i) int();\n"
              "}\n");
        ASSERT_EQUALS("", errout.str()); // don't crash

which is actually an AST issue: https://trac.cppcheck.net/ticket/10934

@chrchr-github
Copy link
Collaborator Author

Those TODOs make no sense though.

@chrchr-github chrchr-github reopened this Nov 20, 2023
@chrchr-github chrchr-github marked this pull request as draft November 20, 2023 18:52
@chrchr-github chrchr-github marked this pull request as ready for review November 20, 2023 20:21
@chrchr-github chrchr-github merged commit 83b5cb5 into danmar:main Nov 22, 2023
68 checks passed
@chrchr-github chrchr-github deleted the chr_Fix12203 branch November 22, 2023 13:05
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.

3 participants