Skip to content

Commit 7205f2b

Browse files
committed
Explain why err_arc_may_not_respond needs to be treated as unrecoverable
1 parent 83714a8 commit 7205f2b

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

clang/lib/Basic/DiagnosticIDs.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -832,8 +832,11 @@ bool DiagnosticIDs::isUnrecoverable(unsigned DiagID) const {
832832
DiagID == diag::err_unavailable_message)
833833
return false;
834834

835-
// Currently we consider all ARC errors except err_arc_may_not_respond as
836-
// recoverable.
835+
// All ARC errors are currently considered recoverable, with the exception of
836+
// err_arc_may_not_respond. This specific error is treated as unrecoverable
837+
// because sending a message with an unknown selector could lead to crashes
838+
// within CodeGen if the resulting expression is used to initialize a C++
839+
// auto variable, where type deduction is required.
837840
if (isARCDiagnostic(DiagID) && DiagID != diag::err_arc_may_not_respond)
838841
return false;
839842

0 commit comments

Comments
 (0)