Commit Graph

5 Commits

Author SHA1 Message Date
Richard Smith d209967a68 Remove warning on over-wide bit-field of boolean type; there's no risk that
someone thought all the bits would be value bits in this case.

Also fix the wording of the warning -- it claimed that the width of 'bool' is
8, which is not correct; the width is 1 bit, whereas the size is 8 bits in our
implementation.

llvm-svn: 248435
2015-09-23 22:07:44 +00:00
David Majnemer 1cbe80408d [MS ABI] Restore our warning for overwide bitfields using the MS ABI
This restores a diagnostic lost in r247651.

llvm-svn: 247659
2015-09-15 02:36:41 +00:00
David Majnemer d558aa8627 [MS ABI] Overwide bool bitfields should be permitted
Overwide bool bitfields have eight bits of storage size, make sure we
take the padding into account when determining whether or not they are
problematic.

llvm-svn: 247651
2015-09-15 01:00:55 +00:00
Rachel Craik 022bdc7d73 C11 _Bool bitfield diagnostic
Summary: Implement DR262 (for C). This patch will mainly affect bitfields of type _Bool

Reviewers: fraggamuffin, rsmith

Subscribers: hubert.reinterpretcast, cfe-commits

Differential Revision: http://reviews.llvm.org/D10018

llvm-svn: 247618
2015-09-14 21:27:36 +00:00
Reid Kleckner 736bc98f9c MS wide bitfield error check in Sema
cl.exe treats wide bitfields as an error. This patch causes them to be
an error if IsMsStruct is true, as it is in straight C.

Patch by Warren Hunt!

Reviewers: eli.friedman

Differential Revision: http://llvm-reviews.chandlerc.com/D1125

llvm-svn: 186536
2013-07-17 20:46:03 +00:00