[PATCH] D34114: [clang] A better format for unnecessary packed warning.

2017-07-26 Thread Yan Wang via Phabricator via cfe-commits
yawanng added a comment. In https://reviews.llvm.org/D34114#800253, @rsmith wrote: > Some concrete suggestions throughout the patch, but I think we should take a > step back and reconsider this warning approach: it seems bizarre for us to > warn on any packed struct that happens to contain a `c

[PATCH] D34114: [clang] A better format for unnecessary packed warning.

2017-07-26 Thread Yan Wang via Phabricator via cfe-commits
yawanng updated this revision to Diff 108380. yawanng edited the summary of this revision. yawanng added a comment. Change the condition of this unnecessary packed warning to when the alignment of the class is one byte. Remove all field-level warning. https://reviews.llvm.org/D34114 Files: l

[PATCH] D34114: [clang] A better format for unnecessary packed warning.

2017-07-06 Thread Chih-Hung Hsieh via Phabricator via cfe-commits
chh added a comment. These warnings are triggered by -Wpadded -Wpacked or clang-tidy's clang-diagnostic-packed check. I agree that they should be ignored or suppressed in many cases. What I am not sure is the amount of real positive cases. I found it too tedious to suppress one warning per struct

[PATCH] D34114: [clang] A better format for unnecessary packed warning.

2017-07-05 Thread Stephen Hines via Phabricator via cfe-commits
srhines added a comment. Richard's points are really valid here. I missed the aspect that packed always implies alignment 1, which does have an effect on the code in most of the cases listed here. I agree that the value of this warning is low, since the possibility of false-positive is quite hi

[PATCH] D34114: [clang] A better format for unnecessary packed warning.

2017-07-05 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. Some concrete suggestions throughout the patch, but I think we should take a step back and reconsider this warning approach: it seems bizarre for us to warn on any packed struct that happens to contain a `char`. It would make sense to warn if an `__attribute__((packed))`

[PATCH] D34114: [clang] A better format for unnecessary packed warning.

2017-07-05 Thread Yan Wang via Phabricator via cfe-commits
yawanng added a comment. PING Repository: rL LLVM https://reviews.llvm.org/D34114 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D34114: [clang] A better format for unnecessary packed warning.

2017-06-22 Thread Stephen Hines via Phabricator via cfe-commits
srhines added a comment. Richard, can you take a look at this, or suggest someone who would be a good reviewer for this improved diagnostic? Thanks. Repository: rL LLVM https://reviews.llvm.org/D34114 ___ cfe-commits mailing list cfe-commits@lis

[PATCH] D34114: [clang] A better format for unnecessary packed warning.

2017-06-16 Thread Yan Wang via Phabricator via cfe-commits
yawanng added a comment. Ping. Repository: rL LLVM https://reviews.llvm.org/D34114 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits