Skip to content

Commit 88a3d90

Browse files
committed
---
yaml --- r: 349508 b: refs/heads/master-next c: a4fc5f3 h: refs/heads/master
1 parent 0cf0f71 commit 88a3d90

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
refs/heads/master: 3574c513bbc5578dd9346b4ea9ab5995c5927bb5
3-
refs/heads/master-next: 075acb0415aca5e232d1f5df2037d992fadd764f
3+
refs/heads/master-next: a4fc5f34f93cd80ad5ecb718d7c6b9f3e4ea2726
44
refs/tags/osx-passed: b6b74147ef8a386f532cf9357a1bde006e552c54
55
refs/tags/swift-2.2-SNAPSHOT-2015-12-01-a: 6bb18e013c2284f2b45f5f84f2df2887dc0f7dea
66
refs/tags/swift-2.2-SNAPSHOT-2015-12-01-b: 66d897bfcf64a82cb9a87f5e663d889189d06d07

branches/master-next/lib/AST/ASTScopeCreation.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,9 @@ class ScopeCreator final {
168168

169169
ScopeCreator(SourceFile *SF)
170170
: ctx(SF->getASTContext()),
171-
sourceFileScope(new (ctx) ASTSourceFileScope(SF, this)) {}
171+
sourceFileScope(new (ctx) ASTSourceFileScope(SF, this)) {
172+
ctx.addDestructorCleanup(scopedNodes);
173+
}
172174

173175
ScopeCreator(const ScopeCreator &) = delete; // ensure no copies
174176
ScopeCreator(const ScopeCreator &&) = delete; // ensure no moves
@@ -660,8 +662,6 @@ class ScopeCreator final {
660662

661663
// Make vanilla new illegal for ASTScopes.
662664
void *operator new(size_t bytes) = delete;
663-
// Need this because have virtual destructors
664-
void operator delete(void *data) {}
665665

666666
// Only allow allocation of scopes using the allocator of a particular source
667667
// file.

0 commit comments

Comments
 (0)