This is not a change in the rules, it's meant as a clarification about
warnings. Since the recovery from warnings is a no-op, the fix-it hints
on warnings shouldn't change anything. Anything that doesn't just
suppress the warning and changes the meaning of the code (even if it's
for the better) should be on an additional note.
Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
Thank you for working on this!
docs/InternalsManual.rst | ||
---|---|---|
426–428 ↗ | (On Diff #201469) | How about: Fix-it hints on a warning must not change the meaning of code, only clarify it. For example, adding parentheses in case of counterintuitive precedence to clarify the order of operations. |
docs/InternalsManual.rst | ||
---|---|---|
426–428 ↗ | (On Diff #201469) |
Wasn't sure about the order between “not change”/“only clarify”. If it sounds better to you, I'll take that.
Can we add a finite verb, like “For example, it would be fine to add parantheses ...” Also, I would probably shorten “in case of counterintuitive precedence to clarify the order of operations” to “to clarify the precedence of operators.” So we have For example, it would be fine to add parantheses to clarify the precedence of operators. |
docs/InternalsManual.rst | ||
---|---|---|
426–428 ↗ | (On Diff #201469) |
I think the most important bit is that it must not change code meaning, so that's why I suggest putting it first.
I like it! Though I'd spell it parentheses instead. ;-) |
docs/InternalsManual.rst | ||
---|---|---|
426–428 ↗ | (On Diff #201469) |
There must have been a red squiggly line, but I've apparently decided to ignore it. |