diff options
author | Douglas Gregor <dgregor@apple.com> | 2011-07-13 02:14:02 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2011-07-13 02:14:02 +0000 |
commit | d29fde248e8e3f7e1ede08ba79ce0f812813ccce (patch) | |
tree | e71bd0bfc5af33029f19e4eb5452dca33e1f3b6e /clang/lib/Sema/SemaDeclCXX.cpp | |
parent | 609ada27cedb299d684a3879ddd9f6ea9e6df521 (diff) | |
download | bcm5719-llvm-d29fde248e8e3f7e1ede08ba79ce0f812813ccce.tar.gz bcm5719-llvm-d29fde248e8e3f7e1ede08ba79ce0f812813ccce.zip |
Eliminate an incomplete/incorrect attempt to provide support for C++0x
unrestricted unions, which ended up attempting to initialize objects
in a union (which CodeGen isn't prepared for). Fixes PR9683.
llvm-svn: 135027
Diffstat (limited to 'clang/lib/Sema/SemaDeclCXX.cpp')
-rw-r--r-- | clang/lib/Sema/SemaDeclCXX.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/clang/lib/Sema/SemaDeclCXX.cpp b/clang/lib/Sema/SemaDeclCXX.cpp index 62c163435c7..d793daf9d82 100644 --- a/clang/lib/Sema/SemaDeclCXX.cpp +++ b/clang/lib/Sema/SemaDeclCXX.cpp @@ -2190,11 +2190,8 @@ static bool CollectFieldInitializer(Sema &SemaRef, BaseAndFieldInfo &Info, } } - // Fallthrough and construct a default initializer for the union as - // a whole, which can call its default constructor if such a thing exists - // (C++0x perhaps). FIXME: It's not clear that this is the correct - // behavior going forward with C++0x, when anonymous unions there are - // finalized, we should revisit this. + // FIXME: C++0x unrestricted unions might call a default constructor here. + return false; } else { // For structs, we simply descend through to initialize all members where // necessary. |