diff options
| author | John McCall <rjmccall@apple.com> | 2010-03-16 05:22:47 +0000 |
|---|---|---|
| committer | John McCall <rjmccall@apple.com> | 2010-03-16 05:22:47 +0000 |
| commit | 1064d7ef2992225ddbd792d1b54d144b809b5b39 (patch) | |
| tree | 88f1e281008547a71ab0218d0c4a2874a961a5e6 /clang/lib/Sema/SemaDeclAttr.cpp | |
| parent | 7bda4b831018692de8221bd0283d6d55f70dc35b (diff) | |
| download | bcm5719-llvm-1064d7ef2992225ddbd792d1b54d144b809b5b39.tar.gz bcm5719-llvm-1064d7ef2992225ddbd792d1b54d144b809b5b39.zip | |
Perform access control for the implicit base and member destructor calls
required when emitting a destructor definition.
llvm-svn: 98609
Diffstat (limited to 'clang/lib/Sema/SemaDeclAttr.cpp')
| -rw-r--r-- | clang/lib/Sema/SemaDeclAttr.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/clang/lib/Sema/SemaDeclAttr.cpp b/clang/lib/Sema/SemaDeclAttr.cpp index d369b773e8d..73a34f8107e 100644 --- a/clang/lib/Sema/SemaDeclAttr.cpp +++ b/clang/lib/Sema/SemaDeclAttr.cpp @@ -2038,6 +2038,8 @@ void Sema::PopParsingDeclaration(ParsingDeclStackState S, DeclPtrTy Ctx) { assert(SavedIndex <= DelayedDiagnostics.size() && "saved index is out of bounds"); + unsigned E = DelayedDiagnostics.size(); + // We only want to actually emit delayed diagnostics when we // successfully parsed a decl. Decl *D = Ctx ? Ctx.getAs<Decl>() : 0; @@ -2048,7 +2050,7 @@ void Sema::PopParsingDeclaration(ParsingDeclStackState S, DeclPtrTy Ctx) { // only the declarator pops will be passed decls. This is correct; // we really do need to consider delayed diagnostics from the decl spec // for each of the different declarations. - for (unsigned I = 0, E = DelayedDiagnostics.size(); I != E; ++I) { + for (unsigned I = 0; I != E; ++I) { if (DelayedDiagnostics[I].Triggered) continue; @@ -2064,6 +2066,10 @@ void Sema::PopParsingDeclaration(ParsingDeclStackState S, DeclPtrTy Ctx) { } } + // Destroy all the delayed diagnostics we're about to pop off. + for (unsigned I = SavedIndex; I != E; ++I) + DelayedDiagnostics[I].destroy(); + DelayedDiagnostics.set_size(SavedIndex); } |

