[PATCH] D27424: Add the diagnose_if attribute to clang.

2017-01-08 Thread George Burgess IV via Phabricator via cfe-commits
george.burgess.iv added a comment. Thanks for the review! :) Repository: rL LLVM https://reviews.llvm.org/D27424 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D27424: Add the diagnose_if attribute to clang.

2017-01-08 Thread George Burgess IV via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL291418: Add the diagnose_if attribute to clang. (authored by gbiv). Changed prior to commit: https://reviews.llvm.org/D27424?vs=83412=83584#toc Repository: rL LLVM https://reviews.llvm.org/D27424

[PATCH] D27424: Add the diagnose_if attribute to clang.

2017-01-07 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added a comment. Awesome! I'm so excited for this! https://reviews.llvm.org/D27424 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D27424: Add the diagnose_if attribute to clang.

2017-01-07 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. LGTM, but please point this out in the release notes as well. https://reviews.llvm.org/D27424 ___ cfe-commits mailing list

[PATCH] D27424: Add the diagnose_if attribute to clang.

2017-01-06 Thread George Burgess IV via Phabricator via cfe-commits
george.burgess.iv added a comment. > We do: > http://llvm.org/docs/CodingStandards.html#use-auto-type-deduction-to-make-code-more-readable Awesome. Thanks! > Btw, there's a question in there about late parsing that Phab won't let me > delete, feel free to ignore it. ;-) OK. The answer is

[PATCH] D27424: Add the diagnose_if attribute to clang.

2017-01-06 Thread George Burgess IV via Phabricator via cfe-commits
george.burgess.iv updated this revision to Diff 83412. george.burgess.iv marked 2 inline comments as done. george.burgess.iv added a comment. Addressed feedback. Thanks! https://reviews.llvm.org/D27424 Files: include/clang/AST/Expr.h include/clang/Basic/Attr.td

[PATCH] D27424: Add the diagnose_if attribute to clang.

2017-01-05 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In https://reviews.llvm.org/D27424#636496, @george.burgess.iv wrote: > Do we have a page that details when we should/shouldn't use `auto`? I was > under the impression that it was preferred only in cases where the type's > spelled out (e.g. `cast`, ...). (To be

[PATCH] D27424: Add the diagnose_if attribute to clang.

2017-01-04 Thread George Burgess IV via Phabricator via cfe-commits
george.burgess.iv added a comment. Do we have a page that details when we should/shouldn't use `auto`? I was under the impression that it was preferred only in cases where the type's spelled out (e.g. `cast`, ...). (To be clear, I'm happy to use it in loops, too; I'd just like to know if we

[PATCH] D27424: Add the diagnose_if attribute to clang.

2017-01-04 Thread George Burgess IV via Phabricator via cfe-commits
george.burgess.iv updated this revision to Diff 83188. george.burgess.iv marked 18 inline comments as done. george.burgess.iv added a comment. Addressed all feedback + made `diagnose_if` late-parsed. https://reviews.llvm.org/D27424 Files: include/clang/AST/Expr.h

[PATCH] D27424: Add the diagnose_if attribute to clang.

2016-12-22 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. I really like this attribute, thank you for working on it! Comment at: include/clang/Basic/Attr.td:1584 +def DiagnoseIf : InheritableAttr { + let Spellings = [GNU<"diagnose_if">]; + let Subjects = SubjectList<[Function]>; I

[PATCH] D27424: Add the diagnose_if attribute to clang.

2016-12-13 Thread George Burgess IV via Phabricator via cfe-commits
george.burgess.iv updated this revision to Diff 81259. george.burgess.iv marked an inline comment as done. george.burgess.iv added a comment. Addressed alignment comment. Thanks! (Late parsing is still to-be-done) https://reviews.llvm.org/D27424 Files: include/clang/Basic/Attr.td

[PATCH] D27424: Add the diagnose_if attribute to clang.

2016-12-13 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added inline comments. Comment at: include/clang/Sema/Overload.h:754 +unsigned NumInlineBytesUsed; +llvm::AlignedCharArray InlineSpace; I guess you could use "void *" instead of

[PATCH] D27424: Add the diagnose_if attribute to clang.

2016-12-12 Thread George Burgess IV via Phabricator via cfe-commits
george.burgess.iv added a comment. Glad you like it! > The second thing that would be amazing if this attribute was late parsed so > it the ability to reference this when applied to member functions That seems like a good idea; I'll look into what that would take. (In the meantime, reviews

[PATCH] D27424: Add the diagnose_if attribute to clang.

2016-12-05 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added a comment. Awesome, this is exactly what I was hoping for! Thanks for working on this! I'm a bit surprised that the attribute fails to evaluate the condition as a constant expression during the evaluation of constexpr functions. Ex: #define DIAG(...)

[PATCH] D27424: Add the diagnose_if attribute to clang.

2016-12-05 Thread George Burgess IV via Phabricator via cfe-commits
george.burgess.iv created this revision. george.burgess.iv added reviewers: rsmith, aaron.ballman. george.burgess.iv added subscribers: EricWF, cfe-commits. This patch adds the `diagnose_if` attribute to clang. `diagnose_if` is meant to be a less powerful version of `enable_if`: it doesn't