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
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
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
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
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
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
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
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
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
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
10 matches
Mail list logo