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; }
 


_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to