diff options
author | Fariborz Jahanian <fjahanian@apple.com> | 2009-06-19 19:55:27 +0000 |
---|---|---|
committer | Fariborz Jahanian <fjahanian@apple.com> | 2009-06-19 19:55:27 +0000 |
commit | f8dcb866d344aa9355595e14c429852830b63095 (patch) | |
tree | 5c89ce6064cd7c386580b2831b5cdb5163f93827 /lib/Sema/SemaDecl.cpp | |
parent | 3ff12591494a3cb3d3a24427975df58714ac3b2f (diff) |
Patch for implementation of C++'s object model. This is
work in progress.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73782 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaDecl.cpp')
-rw-r--r-- | lib/Sema/SemaDecl.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/Sema/SemaDecl.cpp b/lib/Sema/SemaDecl.cpp index 9e31bae79d..c4d1fe9983 100644 --- a/lib/Sema/SemaDecl.cpp +++ b/lib/Sema/SemaDecl.cpp @@ -2732,8 +2732,12 @@ void Sema::ActOnUninitializedDecl(DeclPtrTy dcl) { IK_Default); if (!Constructor) Var->setInvalidDecl(); - else if (!RD->hasTrivialConstructor()) - InitializeVarWithConstructor(Var, Constructor, InitType, 0, 0); + else { + if (!RD->hasTrivialConstructor()) + InitializeVarWithConstructor(Var, Constructor, InitType, 0, 0); + // Check for valid construction. + DefineImplicitDefaultConstructor(Var->getLocation(), Constructor); + } } } |