Don't destroy the data associated with an overload resolution candidate; it's ASTCont...
authorDouglas Gregor <dgregor@apple.com>
Sat, 8 May 2010 20:20:05 +0000 (20:20 +0000)
committerDouglas Gregor <dgregor@apple.com>
Sat, 8 May 2010 20:20:05 +0000 (20:20 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103350 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Sema/SemaOverload.cpp

index 517574b5955d45fafb239fc0dfb505f0ae0540ee..6281a324a2283cfefbf6045875c3616aa2168c46 100644 (file)
@@ -341,7 +341,7 @@ void OverloadCandidate::DeductionFailureInfo::Destroy() {
       
   case Sema::TDK_Inconsistent:
   case Sema::TDK_InconsistentQuals:
-    delete static_cast<DFIParamWithArguments*>(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();
 }