Skip to content

Fix #11604 Debug: DacaWrongData - #8752

Open
chrchr-github wants to merge 2 commits into
cppcheck-opensource:mainfrom
chrchr-github:chr_11604
Open

Fix #11604 Debug: DacaWrongData#8752
chrchr-github wants to merge 2 commits into
cppcheck-opensource:mainfrom
chrchr-github:chr_11604

Conversation

@chrchr-github

Copy link
Copy Markdown
Collaborator

No description provided.

@chrchr-github
chrchr-github marked this pull request as draft July 23, 2026 19:54
@chrchr-github
chrchr-github marked this pull request as ready for review August 11, 2026 12:37
Comment thread lib/check.h
class Tokenizer;

/** Use WRONG_DATA in checkers to mark conditions that check that data is correct */
#define WRONG_DATA(COND, TOK) ((COND) && wrongData((TOK), #COND))

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

does this mean that wrongData is never used and can be removed also?

@danmar

danmar commented Aug 22, 2026

Copy link
Copy Markdown
Contributor

According to 11604 there is a debug warning for this code:

struct S {
    S() {
        t = 0;
    }
    decltype(NULL) t;
};

so if t does not get a valuetype here, it indicates that there is room for improvement in cppcheck symboldatabase and then the debug warning seems good to me? A fix to set the valuetype would be preferable?

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