diff options
author | Sean Hunt <scshunt@csclub.uwaterloo.ca> | 2011-05-05 03:36:28 +0000 |
---|---|---|
committer | Sean Hunt <scshunt@csclub.uwaterloo.ca> | 2011-05-05 03:36:28 +0000 |
commit | ad7ec12ef2edbadb85a3754f0395ef2f06d4256c (patch) | |
tree | db1fe46fc1aa90aaf1089ea66bbd9a54e7b17ba0 /lib/Sema/SemaDeclCXX.cpp | |
parent | 7665ad83d8eff7b8b2c5f3b893b6b7ece38f847c (diff) |
Implement some framework for defaulted constructors.
There's some unused stuff for now.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130912 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaDeclCXX.cpp')
-rw-r--r-- | lib/Sema/SemaDeclCXX.cpp | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/lib/Sema/SemaDeclCXX.cpp b/lib/Sema/SemaDeclCXX.cpp index 7b28696814..2ef15b672d 100644 --- a/lib/Sema/SemaDeclCXX.cpp +++ b/lib/Sema/SemaDeclCXX.cpp @@ -963,7 +963,10 @@ Sema::ActOnCXXMemberDeclarator(Scope *S, AccessSpecifier AS, Declarator &D, MultiTemplateParamsArg TemplateParameterLists, ExprTy *BW, const VirtSpecifiers &VS, ExprTy *InitExpr, bool IsDefinition, - bool Deleted) { + bool Deleted, bool Defaulted) { + // FIXME: Do something with this + (void) Defaulted; + const DeclSpec &DS = D.getDeclSpec(); DeclarationNameInfo NameInfo = GetNameForDeclarator(D); DeclarationName Name = NameInfo.getName(); @@ -4956,7 +4959,8 @@ CXXConstructorDecl *Sema::DeclareImplicitDefaultConstructor( /*TInfo=*/0, /*isExplicit=*/false, /*isInline=*/true, - /*isImplicitlyDeclared=*/true); + /*isImplicitlyDeclared=*/true, + /*isExplicitlyDefaulted=*/false); DefaultCon->setAccess(AS_public); DefaultCon->setImplicit(); DefaultCon->setTrivial(ClassDecl->hasTrivialConstructor()); @@ -5152,7 +5156,8 @@ void Sema::DeclareInheritedConstructors(CXXRecordDecl *ClassDecl) { CXXConstructorDecl *NewCtor = CXXConstructorDecl::Create( Context, ClassDecl, UsingLoc, DNI, QualType(NewCtorType, 0), /*TInfo=*/0, BaseCtor->isExplicit(), /*Inline=*/true, - /*ImplicitlyDeclared=*/true); + /*ImplicitlyDeclared=*/true, + /*isExplicitlyDefaulted*/false); NewCtor->setAccess(BaseCtor->getAccess()); // Build up the parameter decls and add them. @@ -6101,7 +6106,8 @@ CXXConstructorDecl *Sema::DeclareImplicitCopyConstructor( /*TInfo=*/0, /*isExplicit=*/false, /*isInline=*/true, - /*isImplicitlyDeclared=*/true); + /*isImplicitlyDeclared=*/true, + /*isExplicitlyDefaulted=*/false); CopyConstructor->setAccess(AS_public); CopyConstructor->setTrivial(ClassDecl->hasTrivialCopyConstructor()); |