File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -751,9 +751,11 @@ namespace clang {
751751 OverloadCandidateSet (const OverloadCandidateSet &) LLVM_DELETED_FUNCTION;
752752 void operator =(const OverloadCandidateSet &) LLVM_DELETED_FUNCTION;
753753
754+ void destroyCandidates ();
755+
754756 public:
755757 OverloadCandidateSet (SourceLocation Loc) : Loc(Loc), NumInlineSequences(0 ){}
756- ~OverloadCandidateSet () { clear (); }
758+ ~OverloadCandidateSet () { destroyCandidates (); }
757759
758760 SourceLocation getLocation () const { return Loc; }
759761
Original file line number Diff line number Diff line change @@ -740,13 +740,17 @@ OverloadCandidate::DeductionFailureInfo::getSecondArg() {
740740 return 0 ;
741741}
742742
743- void OverloadCandidateSet::clear () {
743+ void OverloadCandidateSet::destroyCandidates () {
744744 for (iterator i = begin (), e = end (); i != e; ++i) {
745745 for (unsigned ii = 0 , ie = i->NumConversions ; ii != ie; ++ii)
746746 i->Conversions [ii].~ImplicitConversionSequence ();
747747 if (!i->Viable && i->FailureKind == ovl_fail_bad_deduction)
748748 i->DeductionFailure .Destroy ();
749749 }
750+ }
751+
752+ void OverloadCandidateSet::clear () {
753+ destroyCandidates ();
750754 NumInlineSequences = 0 ;
751755 Candidates.clear ();
752756 Functions.clear ();
You can’t perform that action at this time.
0 commit comments