Skip to content

fix #13954: Unnamed bit fields are removed.#7611

Merged
danmar merged 15 commits into
cppcheck-opensource:mainfrom
ludviggunne:13954
Jul 4, 2025
Merged

fix #13954: Unnamed bit fields are removed.#7611
danmar merged 15 commits into
cppcheck-opensource:mainfrom
ludviggunne:13954

Conversation

@ludviggunne

@ludviggunne ludviggunne commented Jun 19, 2025

Copy link
Copy Markdown
Collaborator

No description provided.

@ludviggunne ludviggunne force-pushed the 13954 branch 8 times, most recently from 263ea07 to 3f9f968 Compare June 23, 2025 12:00
Comment thread addons/cppcheckdata.py Outdated
@ludviggunne ludviggunne marked this pull request as ready for review June 23, 2025 14:53
Comment thread lib/token.h Outdated
Comment thread lib/token.h Outdated
Comment thread lib/tokenize.cpp Outdated
Comment thread lib/tokenize.cpp Outdated
@ludviggunne ludviggunne force-pushed the 13954 branch 2 times, most recently from 5859d52 to 491e305 Compare June 24, 2025 13:16
@danmar

danmar commented Jun 24, 2025

Copy link
Copy Markdown
Collaborator

what does the test-my-pr.py say? are there diffs..?

@ludviggunne

Copy link
Copy Markdown
Collaborator Author

what does the test-my-pr.py say? are there diffs..?

I've only run it with e2764f0 so far, so I should probably run it again. There are some diffs, most of them seem to be eliminated false positive similar to #13653 & #13850.

Comment thread lib/checkclass.cpp Outdated
Comment thread lib/checkunusedvar.cpp Outdated
Comment thread lib/token.h Outdated
Comment thread lib/token.h Outdated
Comment thread lib/token.h Outdated
Comment thread lib/tokenize.cpp
Comment thread lib/tokenize.cpp
Comment thread test/testvalueflow.cpp

@danmar danmar left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

As I understand it the test-my-pr.py show no diffs for a large number of packages and after days of execution.

The tests are unfortunate. We can't know the exact size of a bitfield struct so it should not have a "known" value. Some kind of "portability" values would be fine. But as far as I see we already had this problem in latest 2.17 release so it's not caused by this PR.

@danmar danmar left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

sorry but I think the Token isAnonymous() attribute would be necessary to have for addons also. Can you please add this attribute in the dumpfile?

@danmar danmar merged commit 326a930 into cppcheck-opensource:main Jul 4, 2025
53 checks passed
@ludviggunne ludviggunne deleted the 13954 branch July 4, 2025 12:32
@firewave

firewave commented Jul 7, 2025

Copy link
Copy Markdown
Collaborator

This introduced a performance regression (hang): https://trac.cppcheck.net/ticket/13995.

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