]> granicus.if.org Git - clang/commit
Fix PR7402: We were creating implicit member initializers for every field in an
authorChandler Carruth <chandlerc@gmail.com>
Wed, 30 Jun 2010 00:54:29 +0000 (00:54 +0000)
committerChandler Carruth <chandlerc@gmail.com>
Wed, 30 Jun 2010 00:54:29 +0000 (00:54 +0000)
commite9c9d15ef9429257136564c5bab76dbe286e37c7
tree65b342ebd0421a099fdef7432bf51fc7dbb96909
parent7bbe03d8ae0772d89f6539d073dd43e49268a42c
Fix PR7402: We were creating implicit member initializers for every field in an
anonymous union under the presumption that they didn't do anything. While this
is true, our checks for redundant initialization of an anonymous union still
fire when these overlap with explicit user initialization. A cleaner approach
is to avoid initializing multiple members of a union altogether, but this still
is in a rather fuzzy are especially when C++0x allows non-POD types into
unions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107235 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Sema/SemaDeclCXX.cpp
test/SemaCXX/constructor-initializer.cpp