@@ -250,23 +250,22 @@ class StmtComparer {
250250 return E1 ->isExact () == E2 ->isExact () && E1 ->getValue () == E2 ->getValue ();
251251 }
252252
253- bool IsStmtEquivalent (const GenericSelectionExpr *E1 ,
254- const GenericSelectionExpr *E2 ) {
255- for (auto Pair : zip_longest (E1 ->getAssocTypeSourceInfos (),
256- E2 ->getAssocTypeSourceInfos ())) {
257- std::optional<TypeSourceInfo *> Child1 = std::get<0 >(Pair);
258- std::optional<TypeSourceInfo *> Child2 = std::get<1 >(Pair);
259- // Skip this case if there are a different number of associated types.
260- if (!Child1 || !Child2)
261- return false ;
253+ bool IsStmtEquivalent ( const GenericSelectionExpr *E1 ,
254+ const GenericSelectionExpr *E2 ) {
255+ for ( auto Pair : zip_longest ( E1 ->getAssocTypeSourceInfos (),
256+ E2 ->getAssocTypeSourceInfos () ) ) {
257+ std::optional<TypeSourceInfo *> Child1 = std::get<0 >( Pair );
258+ std::optional<TypeSourceInfo *> Child2 = std::get<1 >( Pair );
259+ // Skip this case if there are a different number of associated types.
260+ if ( !Child1 || !Child2 ) return false ;
261+
262+ if ( !IsStructurallyEquivalent ( Context, ( *Child1 )->getType (),
263+ ( *Child2 )->getType () ) ) return false ;
264+ }
262265
263- if (!IsStructurallyEquivalent (Context, (*Child1)->getType (),
264- (*Child2)->getType ()))
265- return false ;
266- }
266+ return true ;
267+ }
267268
268- return true ;
269- }
270269
271270 bool IsStmtEquivalent (const ImplicitCastExpr *CastE1,
272271 const ImplicitCastExpr *CastE2) {
0 commit comments