diff options
author | Sean Hunt <scshunt@csclub.uwaterloo.ca> | 2011-05-11 22:34:38 +0000 |
---|---|---|
committer | Sean Hunt <scshunt@csclub.uwaterloo.ca> | 2011-05-11 22:34:38 +0000 |
commit | cdee3fee8ca4df7fb9179f29cc3ba96ac4fd0f95 (patch) | |
tree | 9d86f43d739eac08f4290ac8d1563ea609d83ef1 /lib/Sema/SemaDecl.cpp | |
parent | 83e0995105222b078a57e1e20ef71fbfd0f67d3d (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.cpp | 5 |
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 |