Skip to content

Fix #12365 checkLibraryFunction for std::string constructor#5893

Merged
orbitcowboy merged 3 commits intocppcheck-opensource:mainfrom
chrchr-github:chr_Fix12365
Jan 18, 2024
Merged

Fix #12365 checkLibraryFunction for std::string constructor#5893
orbitcowboy merged 3 commits intocppcheck-opensource:mainfrom
chrchr-github:chr_Fix12365

Conversation

@chrchr-github
Copy link
Copy Markdown
Collaborator

I wonder why both %name% and %type% match return.

@chrchr-github
Copy link
Copy Markdown
Collaborator Author

Not sure why the incorrect argument to check() wasn't detected. This gives a knownArgument warning:

#define MACRO(...) f(__FILE__, __LINE__, __VA_ARGS__)

void f(const char*, int, const char*, bool = false, int* = nullptr);
void g(int i, int j) {
	MACRO("abc", &j);
}

@chrchr-github chrchr-github changed the title Partial fix for #12365 checkLibraryFunction for std::string constructor Fix #12365 checkLibraryFunction for std::string constructor Jan 18, 2024
Copy link
Copy Markdown
Collaborator

@danmar danmar left a comment

Choose a reason for hiding this comment

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

lgtm

@orbitcowboy orbitcowboy merged commit 6c0bb5e into cppcheck-opensource:main Jan 18, 2024
@chrchr-github chrchr-github deleted the chr_Fix12365 branch January 18, 2024 21:30
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