diff options
| author | Fariborz Jahanian <fjahanian@apple.com> | 2009-08-03 19:13:25 +0000 |
|---|---|---|
| committer | Fariborz Jahanian <fjahanian@apple.com> | 2009-08-03 19:13:25 +0000 |
| commit | 6782844874d9cf79cd1600b089d8aeb4f3666990 (patch) | |
| tree | cb1671554e7498012e2b97a61a20879da43ab042 /clang/lib/Sema/SemaDeclCXX.cpp | |
| parent | 9170f36f5c2471605d26041e8e08bc67da33e327 (diff) | |
| download | bcm5719-llvm-6782844874d9cf79cd1600b089d8aeb4f3666990.tar.gz bcm5719-llvm-6782844874d9cf79cd1600b089d8aeb4f3666990.zip | |
Minor renaming/refactoring. No change in functionality.
llvm-svn: 77985
Diffstat (limited to 'clang/lib/Sema/SemaDeclCXX.cpp')
| -rw-r--r-- | clang/lib/Sema/SemaDeclCXX.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/clang/lib/Sema/SemaDeclCXX.cpp b/clang/lib/Sema/SemaDeclCXX.cpp index eedbdcefc61..974dfcc071a 100644 --- a/clang/lib/Sema/SemaDeclCXX.cpp +++ b/clang/lib/Sema/SemaDeclCXX.cpp @@ -2371,14 +2371,14 @@ void Sema::InitializeVarWithConstructor(VarDecl *VD, VD->setInit(Context, Temp); } -void Sema::MarkDestructorReferenced(SourceLocation Loc, QualType DeclInitType) +void Sema::FinalizeVarWithDestructor(VarDecl *VD, QualType DeclInitType) { CXXRecordDecl *ClassDecl = cast<CXXRecordDecl>( DeclInitType->getAs<RecordType>()->getDecl()); if (!ClassDecl->hasTrivialDestructor()) if (CXXDestructorDecl *Destructor = const_cast<CXXDestructorDecl*>(ClassDecl->getDestructor(Context))) - MarkDeclarationReferenced(Loc, Destructor); + MarkDeclarationReferenced(VD->getLocation(), Destructor); } /// AddCXXDirectInitializerToDecl - This action is called immediately after @@ -2447,9 +2447,7 @@ void Sema::AddCXXDirectInitializerToDecl(DeclPtrTy Dcl, VDecl->setCXXDirectInitializer(true); InitializeVarWithConstructor(VDecl, Constructor, DeclInitType, (Expr**)Exprs.release(), NumExprs); - // FIXME. Must do all that is needed to destroy the object - // on scope exit. For now, just mark the destructor as used. - MarkDestructorReferenced(VDecl->getLocation(), DeclInitType); + FinalizeVarWithDestructor(VDecl, DeclInitType); } return; } |

