Re: [PATCH] D10018: C11 _Bool bitfield diagnostic

2015-09-11 Thread Richard Smith via cfe-commits
rsmith accepted this revision. rsmith added a comment. This revision is now accepted and ready to land. Looks great, please go ahead. Sorry it's taken so long to get this reviewed. http://reviews.llvm.org/D10018 ___ cfe-commits mailing list cfe-comm

Re: [PATCH] D10018: C11 _Bool bitfield diagnostic

2015-09-11 Thread Rachel Craik via cfe-commits
rcraik marked 3 inline comments as done. rcraik added a comment. http://reviews.llvm.org/D10018 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D10018: C11 _Bool bitfield diagnostic

2015-09-11 Thread Rachel Craik via cfe-commits
rcraik updated the summary for this revision. rcraik updated this revision to Diff 34571. rcraik added a comment. switched to using getIntWidth instead of getTypeSize and updated the error and warning messages accordingly, as have the necessary test cases. The separate check for _Bool bitfields

Re: [PATCH] D10018: C11 _Bool bitfield diagnostic

2015-09-10 Thread Rachel Craik via cfe-commits
rcraik added inline comments. Comment at: lib/Sema/SemaDecl.cpp:12586 @@ -12585,3 +12585,3 @@ if (!FieldTy->isDependentType()) { uint64_t TypeSize = Context.getTypeSize(FieldTy); if (Value.getZExtValue() > TypeSize) { hubert.reinterpretcast wrote: > r

Re: [PATCH] D10018: C11 _Bool bitfield diagnostic

2015-09-10 Thread Richard Smith via cfe-commits
On Thu, Sep 10, 2015 at 2:17 PM, Rachel Craik wrote: > rcraik added inline comments. > > > Comment at: lib/Sema/SemaDecl.cpp:12586 > @@ -12585,3 +12585,3 @@ >if (!FieldTy->isDependentType()) { > uint64_t TypeSize = Context.getTypeSize(FieldTy); > if (Value.getZExtVa

Re: [PATCH] D10018: C11 _Bool bitfield diagnostic

2015-09-09 Thread Hubert Tong via cfe-commits
hubert.reinterpretcast added inline comments. Comment at: lib/Sema/SemaDecl.cpp:12586 @@ -12585,3 +12585,3 @@ if (!FieldTy->isDependentType()) { uint64_t TypeSize = Context.getTypeSize(FieldTy); if (Value.getZExtValue() > TypeSize) { rsmith wrote: > I

Re: [PATCH] D10018: C11 _Bool bitfield diagnostic

2015-09-09 Thread Hubert Tong via cfe-commits
hubert.reinterpretcast added inline comments. Comment at: lib/Sema/SemaDecl.cpp:12613 @@ +12612,3 @@ +FieldTy->isBooleanType() && +Value.getZExtValue() > 1) { + if (FieldName) rsmith wrote: > This will assert if the specified bitfield width do

Re: [PATCH] D10018: C11 _Bool bitfield diagnostic

2015-09-09 Thread Richard Smith via cfe-commits
rsmith added inline comments. Comment at: include/clang/Basic/DiagnosticSemaKinds.td:4320-4325 @@ -4319,2 +4319,8 @@ "number of elements must be either one or match the size of the vector">; +def warn_bitfield_width_longer_than_necessary : Warning< + "size of bit-field %0 (%1

Re: [PATCH] D10018: C11 _Bool bitfield diagnostic

2015-09-09 Thread Rachel Craik via cfe-commits
rcraik updated this revision to Diff 34339. rcraik added a comment. I've updated the message to make it a bit clearer that this is a portability concern. Are there any further concerns with this patch? http://reviews.llvm.org/D10018 Files: include/clang/Basic/DiagnosticGroups.td include/cl

Re: [PATCH] D10018: C11 _Bool bitfield diagnostic

2015-08-06 Thread Rachel Craik via cfe-commits
rcraik marked 2 inline comments as done. rcraik added a comment. http://reviews.llvm.org/D10018 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits