aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaDecl.cpp
diff options
context:
space:
mode:
authorSean Hunt <scshunt@csclub.uwaterloo.ca>2011-05-11 22:34:38 +0000
committerSean Hunt <scshunt@csclub.uwaterloo.ca>2011-05-11 22:34:38 +0000
commitcdee3fee8ca4df7fb9179f29cc3ba96ac4fd0f95 (patch)
tree9d86f43d739eac08f4290ac8d1563ea609d83ef1 /lib/Sema/SemaDecl.cpp
parent83e0995105222b078a57e1e20ef71fbfd0f67d3d (diff)
Implement implicit deletion of default constructors.
Yes, I'm aware that the diagnostics are awful. Tests to follow. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131203 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaDecl.cpp')
-rw-r--r--lib/Sema/SemaDecl.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/Sema/SemaDecl.cpp b/lib/Sema/SemaDecl.cpp
index 29343886f7..44e47ea8d8 100644
--- a/lib/Sema/SemaDecl.cpp
+++ b/lib/Sema/SemaDecl.cpp
@@ -5642,7 +5642,7 @@ void Sema::ActOnUninitializedDecl(Decl *RealDecl,
const RecordType *Record
= Context.getBaseElementType(Type)->getAs<RecordType>();
- if (Record && getLangOptions().CPlusPlus &&
+ if (Record && getLangOptions().CPlusPlus && !getLangOptions().CPlusPlus0x &&
cast<CXXRecordDecl>(Record->getDecl())->isPOD()) {
// C++03 [dcl.init]p9:
// If no initializer is specified for an object, and the
@@ -5655,6 +5655,9 @@ void Sema::ActOnUninitializedDecl(Decl *RealDecl,
// any, have an indeterminate initial value); if the object
// or any of its subobjects are of const-qualified type, the
// program is ill-formed.
+ // C++0x [dcl.init]p11:
+ // If no initializer is specified for an object, the object is
+ // default-intiialized; [...].
} else {
// Check for jumps past the implicit initializer. C++0x
// clarifies that this applies to a "variable with automatic