[cfe-commits] r148190 - /cfe/trunk/include/clang/Sema/Overload.h
Benjamin Kramer
benny.kra at googlemail.com
Sat Jan 14 09:10:59 PST 2012
Author: d0k
Date: Sat Jan 14 11:10:59 2012
New Revision: 148190
URL: http://llvm.org/viewvc/llvm-project?rev=148190&view=rev
Log:
Destroy OverloadCandidates before taking away the underlying memory.
Modified:
cfe/trunk/include/clang/Sema/Overload.h
Modified: cfe/trunk/include/clang/Sema/Overload.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Sema/Overload.h?rev=148190&r1=148189&r2=148190&view=diff
==============================================================================
--- cfe/trunk/include/clang/Sema/Overload.h (original)
+++ cfe/trunk/include/clang/Sema/Overload.h Sat Jan 14 11:10:59 2012
@@ -707,6 +707,10 @@
public:
OverloadCandidateSet(SourceLocation Loc) : NumInlineSequences(0), Loc(Loc){}
+ ~OverloadCandidateSet() {
+ // Destroy OverloadCandidates before the allocator is destroyed.
+ Candidates.clear();
+ }
SourceLocation getLocation() const { return Loc; }
More information about the cfe-commits
mailing list