- Add notes to our diagnostics.
- Change the way we present diagnostic information.
- For declarations involved in unsafe operations emit a single warning at the variable declaration and attach a per-unsafe-operation note.
- For unsafe operations that don't refer to a variable emit a per-operation warning.
- Change wording of our diagnostics.
Details
Details
Diff Detail
Diff Detail
Event Timeline
Comment Actions
LGTM! I like the new diagnostics a lot better!
clang/include/clang/Basic/DiagnosticSemaKinds.td | ||
---|---|---|
11761 | Folks asked me to do this in my initial patch, I guess we should preserve the tradition, though of course we're still way past the 80-column limit. |
clang/include/clang/Basic/DiagnosticSemaKinds.td | ||
---|---|---|
11761 | Errr, not certain where the confusion came in, but the 80-col limit still exists for these files (we are more relaxed in .td files though because clang-format used to really struggle with them). So I would re-wrap this as: def warn_unsafe_buffer_variable : Warning< "%0 is an %select{unsafe pointer used for buffer access|unsafe buffer that " "does not perform bounds checks}1">, InGroup<UnsafeBufferUsage>, DefaultIgnore; and similar for the rest. |
Folks asked me to do this in my initial patch, I guess we should preserve the tradition, though of course we're still way past the 80-column limit.