Index: cfe/trunk/lib/AST/ASTContext.cpp =================================================================== --- cfe/trunk/lib/AST/ASTContext.cpp +++ cfe/trunk/lib/AST/ASTContext.cpp @@ -2145,7 +2145,7 @@ if (FieldSize != UnionSize) return false; } - return true; + return !RD->field_empty(); } static bool isStructEmpty(QualType Ty) { Index: cfe/trunk/test/SemaCXX/type-traits.cpp =================================================================== --- cfe/trunk/test/SemaCXX/type-traits.cpp +++ cfe/trunk/test/SemaCXX/type-traits.cpp @@ -2566,6 +2566,7 @@ static_assert(!has_unique_object_representations::value, "No references!"); static_assert(!has_unique_object_representations::value, "No references!"); static_assert(!has_unique_object_representations::value, "No empty types!"); +static_assert(!has_unique_object_representations::value, "No empty types!"); class Compressed : Empty { int x;