You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 4b5fe66
Browse filesBrowse the repository at this point in the historyBrowse files
Fix __has_unique_object_representations for several cases:
- A base class with no direct nonstatic data members that inherits
some (and is thus not empty) was treated as an empty base. Its size
was counted as tail padding, making the trait incorrectly FALSE for
derived classes. Use is_empty_class_type instead of checking for an
empty field list.
- Treat unnamed bit-fields of nonzero width in classes as padding, as
the standard requires. Keep the old behavior only in Clang modes
before 17 and g++ modes before 13.1 (except the 10.5, 11.4, and 12.3
backports).
- Do not apply the unnamed bit-field rule to unions, where the bit-field
overlaps the other members; the existing union size check decides.
- In Microsoft mode, as in Clang mode, do not treat a union bit-field
narrower than the union as padding, matching MSVC.
- Restrict treating volatile-qualified non-class types as lacking
unique object representations to g++ modes before version 10, and
no longer apply it in Clang modes.
Add regression tests has-unique-object-rep-inherited-base,
has-unique-object-rep-bit-field, has-unique-object-rep-union-bit-field,
and has-unique-object-rep-volatile, covering standard, g++, Clang, and
Microsoft modes, and update expectations for imported Clang type-traits
and g++ has-unique-obj-representations3 tests.
0 commit comments