[PATCH] D37436: Initial implementation of C attributes (WG14 N2137)

2017-10-15 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman closed this revision. aaron.ballman marked an inline comment as done. aaron.ballman added a comment. I've commit in r315856, thank you for the reviews! Comment at: ../llvm/tools/clang/include/clang/Driver/Options.td:609-616 +def fdouble_square_bracket_attributes +

[PATCH] D37436: Initial implementation of C attributes (WG14 N2137)

2017-10-13 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith accepted this revision. rsmith added a comment. This revision is now accepted and ready to land. Thanks, LGTM :) Comment at: ../llvm/tools/clang/include/clang/Driver/Options.td:609-616 +def fdouble_square_bracket_attributes +: Flag<[ "-" ], "fdouble-square-bracket-at

[PATCH] D37436: Initial implementation of C attributes (WG14 N2137)

2017-10-13 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. Ping. https://reviews.llvm.org/D37436 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D37436: Initial implementation of C attributes (WG14 N2137)

2017-10-07 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/lib/Parse/ParseDecl.cpp:5973-5974 + +// If there are attributes following the identifier list, parse them and +// prohibit them. +MaybeParseCXX11Attributes(FnAttrs); rsmith wrote: > Do you antici

[PATCH] D37436: Initial implementation of C attributes (WG14 N2137)

2017-10-07 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman updated this revision to Diff 118141. aaron.ballman marked 5 inline comments as done. aaron.ballman added a comment. Corrected review feedback from Richard. - Changed the cc1 option to -fdouble-square-bracket-attributes - Corrected regression with opaque-enum-declarations https://

[PATCH] D37436: Initial implementation of C attributes (WG14 N2137)

2017-10-05 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith requested changes to this revision. rsmith added a comment. This revision now requires changes to proceed. Mostly looks good, other than the regression in enum parsing. Comment at: clang/include/clang/Basic/LangOptions.def:140 +LANGOPT(DoubleSquareBracketsAttributes, 1

[PATCH] D37436: Initial implementation of C attributes (WG14 N2137)

2017-10-05 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In https://reviews.llvm.org/D37436#881363, @aaron.ballman wrote: > In https://reviews.llvm.org/D37436#871117, @aaron.ballman wrote: > > > Updated based on review feedback. > > > > - Rename CAttributes to DoubleSquareBracketAttributes > > - Added Objective-C test cas

[PATCH] D37436: Initial implementation of C attributes (WG14 N2137)

2017-09-26 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In https://reviews.llvm.org/D37436#871117, @aaron.ballman wrote: > Updated based on review feedback. > > - Rename CAttributes to DoubleSquareBracketAttributes > - Added Objective-C test cases to demonstrate no regressed behavior (based on > a use-case pointed out d

[PATCH] D37436: Initial implementation of C attributes (WG14 N2137)

2017-09-14 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman updated this revision to Diff 115279. aaron.ballman added a comment. Updated based on review feedback. - Rename CAttributes to DoubleSquareBracketAttributes - Added Objective-C test cases to demonstrate no regressed behavior (based on a use-case pointed out during review) - Fixed r

[PATCH] D37436: Initial implementation of C attributes (WG14 N2137)

2017-09-14 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In https://reviews.llvm.org/D37436#870305, @rsmith wrote: > Also, your wording paper appears to allow things like > > struct [[foo]] S *p; // ok in c n2137, ill-formed in c++ > struct T {}; > int n = sizeof(struct [[foo]] T); // ok in c n2137, ill-formed in c+

[PATCH] D37436: Initial implementation of C attributes (WG14 N2137)

2017-09-13 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. In https://reviews.llvm.org/D37436#869851, @hfinkel wrote: > A large fraction of the number of attributes we'll want to use are going to > fall into this category (because Clang doesn't have its own attributes, but > copied GCC's, for many things). I don't think we'll ge

[PATCH] D37436: Initial implementation of C attributes (WG14 N2137)

2017-09-13 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In https://reviews.llvm.org/D37436#869851, @hfinkel wrote: > In https://reviews.llvm.org/D37436#869467, @aaron.ballman wrote: > > > In https://reviews.llvm.org/D37436#869462, @hfinkel wrote: > > > > > I think that I misunderstood your concern. Let me see if I can su

[PATCH] D37436: Initial implementation of C attributes (WG14 N2137)

2017-09-13 Thread Hal Finkel via Phabricator via cfe-commits
hfinkel added a comment. In https://reviews.llvm.org/D37436#869467, @aaron.ballman wrote: > In https://reviews.llvm.org/D37436#869462, @hfinkel wrote: > > > I think that I misunderstood your concern. Let me see if I can summarize > > your position: You believe that, when GCC implements this synt

[PATCH] D37436: Initial implementation of C attributes (WG14 N2137)

2017-09-13 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In https://reviews.llvm.org/D37436#869462, @hfinkel wrote: > I think that I misunderstood your concern. Let me see if I can summarize your > position: You believe that, when GCC implements this syntax in C, they will > audit their attributes and not support all of

[PATCH] D37436: Initial implementation of C attributes (WG14 N2137)

2017-09-13 Thread Hal Finkel via Phabricator via cfe-commits
hfinkel added a comment. In https://reviews.llvm.org/D37436#869445, @aaron.ballman wrote: > In https://reviews.llvm.org/D37436#869350, @hfinkel wrote: > > > In https://reviews.llvm.org/D37436#868333, @aaron.ballman wrote: > > > > > In https://reviews.llvm.org/D37436#868295, @hfinkel wrote: > > >

[PATCH] D37436: Initial implementation of C attributes (WG14 N2137)

2017-09-13 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman updated this revision to Diff 115015. aaron.ballman added a comment. Added full context, no other changes from previous patch. https://reviews.llvm.org/D37436 Files: clang/include/clang/Basic/Attr.td clang/include/clang/Basic/Attributes.h clang/include/clang/Basic/LangOption

[PATCH] D37436: Initial implementation of C attributes (WG14 N2137)

2017-09-13 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In https://reviews.llvm.org/D37436#869350, @hfinkel wrote: > In https://reviews.llvm.org/D37436#868333, @aaron.ballman wrote: > > > In https://reviews.llvm.org/D37436#868295, @hfinkel wrote: > > > > > In https://reviews.llvm.org/D37436#867965, @aaron.ballman wrote:

[PATCH] D37436: Initial implementation of C attributes (WG14 N2137)

2017-09-13 Thread Hal Finkel via Phabricator via cfe-commits
hfinkel added a comment. Also, please post a full-context patch. https://reviews.llvm.org/D37436 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D37436: Initial implementation of C attributes (WG14 N2137)

2017-09-13 Thread Hal Finkel via Phabricator via cfe-commits
hfinkel added a comment. In https://reviews.llvm.org/D37436#868333, @aaron.ballman wrote: > In https://reviews.llvm.org/D37436#868295, @hfinkel wrote: > > > In https://reviews.llvm.org/D37436#867965, @aaron.ballman wrote: > > > > > In https://reviews.llvm.org/D37436#867287, @rsmith wrote: > > > >

[PATCH] D37436: Initial implementation of C attributes (WG14 N2137)

2017-09-12 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In https://reviews.llvm.org/D37436#868295, @hfinkel wrote: > In https://reviews.llvm.org/D37436#867965, @aaron.ballman wrote: > > > In https://reviews.llvm.org/D37436#867287, @rsmith wrote: > > > > > If this is just supposed to be an experiment to get feedback on th

[PATCH] D37436: Initial implementation of C attributes (WG14 N2137)

2017-09-12 Thread Hal Finkel via Phabricator via cfe-commits
hfinkel added a comment. In https://reviews.llvm.org/D37436#867965, @aaron.ballman wrote: > In https://reviews.llvm.org/D37436#867287, @rsmith wrote: > > > If this is just supposed to be an experiment to get feedback on the > > feature, then I don't think we should be treating it as a different

[PATCH] D37436: Initial implementation of C attributes (WG14 N2137)

2017-09-12 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman updated this revision to Diff 114827. aaron.ballman marked 3 inline comments as done. aaron.ballman added a comment. Updates based on review feedback. https://reviews.llvm.org/D37436 Files: include/clang/Basic/Attr.td include/clang/Basic/Attributes.h include/clang/Basic/Lang

[PATCH] D37436: Initial implementation of C attributes (WG14 N2137)

2017-09-12 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In https://reviews.llvm.org/D37436#867287, @rsmith wrote: > If this is just supposed to be an experiment to get feedback on the feature, > then I don't think we should be treating it as a different attribute syntax > at all. Rather, I think we > just want to per

[PATCH] D37436: Initial implementation of C attributes (WG14 N2137)

2017-09-11 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. If this is just supposed to be an experiment to get feedback on the feature, then I don't think we should be treating it as a different attribute syntax at all. Rather, I think we just want to permit C++11 attributes to be parsed in other language modes. If/when this bec

[PATCH] D37436: Initial implementation of C attributes (WG14 N2137)

2017-09-08 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman updated this revision to Diff 114447. aaron.ballman marked 2 inline comments as done. aaron.ballman added a comment. Updated based on Richard's comments and some further discussion on IRC. https://reviews.llvm.org/D37436 Files: include/clang/Basic/Attr.td include/clang/Basic/A

[PATCH] D37436: Initial implementation of C attributes (WG14 N2137)

2017-09-08 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. Accepting this under `-std=c2x` is premature. We don't even know whether there will be such a standard yet, and this has not been voted into a working draft. But the `-f` flag form is OK. Comment at: include/clang/Driver/Options.td:607 +def fcattribu

[PATCH] D37436: Initial implementation of C attributes (WG14 N2137)

2017-09-04 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman created this revision. Herald added a subscriber: javed.absar. WG14 has demonstrated sincere interest in adding C++-style attributes to C for C2x, and have added the proposal to their SD-3 document tracking features which are possibly desired for the next version of the standard. T