Skip to content

Commit ee8f45c

Browse files
committed
Sema: More useful 'unhandled coercion' assertion
1 parent d4136e9 commit ee8f45c

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lib/Sema/CSApply.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7459,7 +7459,10 @@ Expr *ExprRewriter::coerceToType(Expr *expr, Type toType,
74597459
if (fromType->hasUnresolvedType() || toType->hasUnresolvedType())
74607460
return cs.cacheType(new (ctx) UnresolvedTypeConversionExpr(expr, toType));
74617461

7462-
llvm_unreachable("Unhandled coercion");
7462+
llvm::errs() << "Unhandled coercion:\n";
7463+
fromType->dump(llvm::errs());
7464+
toType->dump(llvm::errs());
7465+
abort();
74637466
}
74647467

74657468
/// Detect whether an assignment to \c baseExpr.member in the given

0 commit comments

Comments
 (0)