-
Notifications
You must be signed in to change notification settings - Fork 37.7k
lint, refactor: Update cppcheck linter to c++17 and improve explicit usage #20530
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
Conversation
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. ConflictsReviewers, this pull request conflicts with the following ones:
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first. |
🕵️ @sipa @practicalswift @achow101 have been requested to review this pull request as specified in the {FILENAME_REVIEWERS} file. |
Concept ACK: explicit is better than implicit generally, and to be explicit: especially when it comes to @fjahr Looks like the fuzzing harnesses needs some massage to compile properly after your fix :) |
Thanks, forgot to do that before pushing. Should be ok now. |
cr ACK 1e62350: patch looks correct! Rationale behind Concept ACK from C++ Core Guidelines: By default, declare single-argument constructors |
review ACK 1e62350 |
I found the
extended-lint-cppcheck
linter still usesstd=c++11
when reviewing #20471. The only difference in the output after this change is one line is missing:After some digging, I am still not sure why this one is ignored with c++17 when 40 other
noExplicitConstructor
warnings were still appearing.In the second commit, I fix these warnings, adding
explicit
where appropriate and adding fixes to ignore otherwise.