commit | 3c3ccdbe73cb43bdf39a9102f5f7eb842fb71952 | [log] [tgz] |
---|---|---|
author | John McCall <rjmccall@apple.com> | Sat Apr 10 09:28:51 2010 +0000 |
committer | John McCall <rjmccall@apple.com> | Sat Apr 10 09:28:51 2010 +0000 |
tree | 33d3d427b0fd948fcd0859460e50000c93430a80 | |
parent | d6ca8da0f5a4115813055729faaa5128e994806d [diff] [blame] |
Diagnose more cases of initializing distinct members of an anonymous union member. Use a better diagnostic for this case. Also fix a bug with nested anonymous structs/unions for -Wreorder; this last was PR6575. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100923 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/SemaCXX/warn-reorder-ctor-initialization.cpp b/test/SemaCXX/warn-reorder-ctor-initialization.cpp index 15e0867..3ff01af 100644 --- a/test/SemaCXX/warn-reorder-ctor-initialization.cpp +++ b/test/SemaCXX/warn-reorder-ctor-initialization.cpp
@@ -108,3 +108,15 @@ Foo y; }; } + +// PR6575: this should not crash +namespace test3 { + struct MyClass { + MyClass() : m_int(0) {} + union { + struct { + int m_int; + }; + }; + }; +}