aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaDeclCXX.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2011-07-13 02:14:02 +0000
committerDouglas Gregor <dgregor@apple.com>2011-07-13 02:14:02 +0000
commite7003b72e691c4d83ba5516c58bccc2f2a4b3fe0 (patch)
tree0b9dd9e034c6b185745a817ebf1085f80455632d /lib/Sema/SemaDeclCXX.cpp
parent42068e9d420889014ee26894e421fead336b239d (diff)
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135027 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaDeclCXX.cpp')
-rw-r--r--lib/Sema/SemaDeclCXX.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/lib/Sema/SemaDeclCXX.cpp b/lib/Sema/SemaDeclCXX.cpp
index 62c163435c..d793daf9d8 100644
--- a/lib/Sema/SemaDeclCXX.cpp
+++ b/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.