[PATCH] D28148: [Sema] Suppress warnings for C's zero initializer

2017-09-07 Thread S. Gilles via Phabricator via cfe-commits
sgilles added a comment. Sure, if it still applies. I'm just a user and have no write access. Looks like I patched this locally and then forgot all about it. https://reviews.llvm.org/D28148 ___ cfe-commits mailing list cfe-commits@lists.llvm.org h

[PATCH] D28148: [Sema] Suppress warnings for C's zero initializer

2017-01-10 Thread S. Gilles via Phabricator via cfe-commits
sgilles marked an inline comment as done. sgilles added a comment. Ping - if there are no comments, could this be accepted? https://reviews.llvm.org/D28148 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman

[PATCH] D28148: [Sema] Suppress warnings for C's zero initializer

2017-01-03 Thread S. Gilles via Phabricator via cfe-commits
sgilles marked an inline comment as done. sgilles added a comment. Thanks to danielmarjamaki and rsmith for comments, which I think this diff addresses. I have not done an extensive search of the codebase for places where `isSyntacticForm()` would be useful, but there don't seem to be any call

[PATCH] D28148: [Sema] Suppress warnings for C's zero initializer

2017-01-03 Thread S. Gilles via Phabricator via cfe-commits
sgilles updated this revision to Diff 82849. sgilles marked 2 inline comments as done. sgilles added a comment. Address danielmarjamaki's and rsmith's comments (creating `InitListExpr::isSyntactic()` since it didn't already exist), as well as correct syntax of test so that it actually runs. ht

[PATCH] D28148: [Sema] Suppress warnings for C's zero initializer

2016-12-29 Thread S. Gilles via Phabricator via cfe-commits
sgilles updated this revision to Diff 82720. sgilles added a comment. Address rsmith's comments, in particular: factor out testing zero initializers to a method of `InitListExpr`; use `ParentIList` instead of `StructuredSubobjectInitList`. The warning is (still) not relaxed for C++ code. I hav

[PATCH] D28148: [Sema] Suppress warnings for C's zero initializer

2016-12-29 Thread S. Gilles via Phabricator via cfe-commits
sgilles added a comment. Thank you for the comments, rsmith. I'm addressing them now, and I'll make sure to add your examples to the test case. I don't think `isSyntactic()` exists, so I'm using `!getSyntactic()` instead, which should have the desired effect. In https://reviews.llvm.org/D281

[PATCH] D28148: [Sema] Suppress warnings for C's zero initializer

2016-12-28 Thread S. Gilles via Phabricator via cfe-commits
sgilles updated the summary for this revision. sgilles updated this revision to Diff 82638. sgilles added a comment. Instead of adding a language option to distinguish C, negatively check against C++. https://reviews.llvm.org/D28148 Files: lib/Sema/SemaInit.cpp test/Sema/zero-initializer.c

[PATCH] D28148: [Sema] Suppress warnings for C's zero initializer

2016-12-28 Thread S. Gilles via Phabricator via cfe-commits
sgilles added a comment. In https://reviews.llvm.org/D28148#632002, @rsmith wrote: > Why are you adding a language option for this? Just use `!LangOpts.CPlusPlus`. I didn't want to have this change accidentally apply to other, non-C++ languages, since I'm not sure which languages would go thro

[PATCH] D28148: [Sema] Suppress warnings for C's zero initializer

2016-12-28 Thread S. Gilles via Phabricator via cfe-commits
sgilles created this revision. sgilles added reviewers: cfe-commits, rsmith, zaks.anna. Add ZeroInitializer as a language option, attached to all standards of C. Relax checks for -Wmissing-field-initializers and -Wmissing-braces so that, for such languages, assigning to a structure with { 0 } prod