-
Notifications
You must be signed in to change notification settings - Fork 37.7k
Enable -Wstring-concatenation and -Wstring-conversion on clang builds #26288
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
3a127d9
to
6709e7e
Compare
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. ReviewsSee the guideline for information on the review process.
If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update. 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. |
6709e7e
to
dc37ef3
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Concept ACK. This has been open for a while, I'm curious to know if any new violations have snuck in since?
Maybe rebase it? |
dc37ef3
to
697fa4d
Compare
f695a79
to
2d6afa4
Compare
2d6afa4
to
f26f19f
Compare
Rebased. 👍 |
Thanks! Now mind updating to use |
f26f19f
to
2c0e21c
Compare
The only current violations are a few uses of assert(!"descriptive string"). Seems the benefit of ensuring against a code fault outweighs the benefit of possible additional information in these cases.
2c0e21c
to
d928fb5
Compare
d928fb5
to
06f5558
Compare
06f5558
to
50e7f52
Compare
Rebased, converted assignments to initialization, and moved to |
🐙 This pull request conflicts with the target branch and needs rebase. |
@@ -934,7 +934,7 @@ bool EvalScript(std::vector<std::vector<unsigned char> >& stack, const CScript& | |||
case OP_ABS: if (bn < bnZero) bn = -bn; break; | |||
case OP_NOT: bn = (bn == bnZero); break; | |||
case OP_0NOTEQUAL: bn = (bn != bnZero); break; | |||
default: assert(!"invalid opcode"); break; | |||
default: assert(false); break; // invalid opcode |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure what the goal here is? This will print something else on stderr when the assert is hit.
Pretty sure the previous code is commonly used and understood?
Closing for now due to lack of progress. Let us know if this should be reopened. |
The only current violations are a few uses of assert(!"descriptive string").
Seems the benefit of ensuring against a code fault outweighs the benefit of possible additional information in these cases.
https://clang.llvm.org/docs/DiagnosticsReference.html#wstring-concatenation