From b02d6b3b94de4f70fea0a9076c96c84a32c7e97e Mon Sep 17 00:00:00 2001 From: Douglas Gregor Date: Sat, 8 May 2010 20:20:05 +0000 Subject: [PATCH] Don't destroy the data associated with an overload resolution candidate; it's ASTContext-allocated now llvm-svn: 103350 --- clang/lib/Sema/SemaOverload.cpp | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/clang/lib/Sema/SemaOverload.cpp b/clang/lib/Sema/SemaOverload.cpp index 517574b5955d..6281a324a228 100644 --- a/clang/lib/Sema/SemaOverload.cpp +++ b/clang/lib/Sema/SemaOverload.cpp @@ -341,7 +341,7 @@ void OverloadCandidate::DeductionFailureInfo::Destroy() { case Sema::TDK_Inconsistent: case Sema::TDK_InconsistentQuals: - delete static_cast(Data); + // FIXME: Destroy the data? Data = 0; break; @@ -459,12 +459,6 @@ OverloadCandidate::DeductionFailureInfo::getSecondArg() { } void OverloadCandidateSet::clear() { - // - for (iterator C = begin(), CEnd = end(); C != CEnd; ++C) { - if (C->FailureKind == ovl_fail_bad_deduction) - C->DeductionFailure.Destroy(); - } - inherited::clear(); Functions.clear(); }