diff options
author | Alexis Hunt <alercah@gmail.com> | 2011-05-18 20:57:11 +0000 |
---|---|---|
committer | Alexis Hunt <alercah@gmail.com> | 2011-05-18 20:57:11 +0000 |
commit | d0cdd1fab1ea27927aed0f2be8fc703c93decfad (patch) | |
tree | 36ba4dbc31334009090a5d67377e069178710d02 /clang/lib/Sema/SemaDecl.cpp | |
parent | 77e0610d7c88a8d096a24e2a76fd78a17e32dc80 (diff) | |
download | bcm5719-llvm-d0cdd1fab1ea27927aed0f2be8fc703c93decfad.tar.gz bcm5719-llvm-d0cdd1fab1ea27927aed0f2be8fc703c93decfad.zip |
Revert r121528 as it breaks a simple testcase, which leads to, among
other things, libcxx not building.
llvm-svn: 131573
Diffstat (limited to 'clang/lib/Sema/SemaDecl.cpp')
-rw-r--r-- | clang/lib/Sema/SemaDecl.cpp | 20 |
1 files changed, 2 insertions, 18 deletions
diff --git a/clang/lib/Sema/SemaDecl.cpp b/clang/lib/Sema/SemaDecl.cpp index d93e5fa5630..3ee1626f7e0 100644 --- a/clang/lib/Sema/SemaDecl.cpp +++ b/clang/lib/Sema/SemaDecl.cpp @@ -4143,25 +4143,14 @@ Sema::ActOnFunctionDeclarator(Scope* S, Declarator& D, DeclContext* DC, // This is a C++ destructor declaration. if (DC->isRecord()) { R = CheckDestructorDeclarator(D, R, SC); - CXXRecordDecl *Record = cast<CXXRecordDecl>(DC); - CXXDestructorDecl *NewDD = CXXDestructorDecl::Create(Context, Record, + NewFD = CXXDestructorDecl::Create(Context, + cast<CXXRecordDecl>(DC), D.getSourceRange().getBegin(), NameInfo, R, TInfo, isInline, /*isImplicitlyDeclared=*/false); - NewFD = NewDD; isVirtualOkay = true; - - // If the class is complete, then we now create the implicit exception - // specification. If the class is incomplete or dependent, we can't do - // it yet. - if (getLangOptions().CPlusPlus0x && !Record->isDependentType() && - Record->getDefinition() && !Record->isBeingDefined() && - R->getAs<FunctionProtoType>()->getExceptionSpecType() == EST_None) { - AdjustDestructorExceptionSpec(Record, NewDD); - } - } else { Diag(D.getIdentifierLoc(), diag::err_destructor_not_member); @@ -8139,11 +8128,6 @@ void Sema::ActOnFields(Scope* S, Convs->setAccess(I, (*I)->getAccess()); if (!CXXRecord->isDependentType()) { - // Adjust user-defined destructor exception spec. - if (getLangOptions().CPlusPlus0x && - CXXRecord->hasUserDeclaredDestructor()) - AdjustDestructorExceptionSpec(CXXRecord,CXXRecord->getDestructor()); - // Add any implicitly-declared members to this class. AddImplicitlyDeclaredMembersToClass(CXXRecord); |