Skip to content

Fix #11167 FP virtual call in destructor even though class is final / Delete 'final' from specializations#4383

Merged
orbitcowboy merged 4 commits intocppcheck-opensource:mainfrom
chrchr-github:chr_Final
Aug 19, 2022
Merged

Fix #11167 FP virtual call in destructor even though class is final / Delete 'final' from specializations#4383
orbitcowboy merged 4 commits intocppcheck-opensource:mainfrom
chrchr-github:chr_Final

Conversation

@chrchr-github
Copy link
Copy Markdown
Collaborator

No description provided.

@firewave
Copy link
Copy Markdown
Collaborator

Actually this is not a "keyword" per spec but an "identifier with special meaning" - see https://en.cppreference.com/w/cpp/keyword.

There's others which also need to be handled. And I wonder if this also needs to be done in other places. Or if those need special handling.

Will also incorporate this into #3774 when the handling is clear.

@chrchr-github
Copy link
Copy Markdown
Collaborator Author

Good catch. It seems that we normally remove final, e.g. in struct S final {};. So the TemplateSimplifier needs to also remove final in instantiations.

@chrchr-github chrchr-github changed the title Add 'final' keyword Delete 'final' from specializations Aug 19, 2022
@chrchr-github chrchr-github changed the title Delete 'final' from specializations Fix #11167 FP virtual call in destructor even though class is final / Delete 'final' from specializations Aug 19, 2022
@orbitcowboy orbitcowboy merged commit 80a486d into cppcheck-opensource:main Aug 19, 2022
@chrchr-github chrchr-github deleted the chr_Final branch October 22, 2022 09:48
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