Skip to content

Conversation

@iMostfa
Copy link
Owner

@iMostfa iMostfa commented Jun 9, 2024

In This PR (as my first contribution to the project) i add support for better diagnostics message when there's an inout @escaping closure

so instead of:

func m(v: inout @escaping () -> Void) {}

we get

error: inout expression is implicitly escaping by definition
func m(v: inout @escaping () -> Void) {}
                ~~~~~~~~~~   ^

Resolves #NNNNN, fix apple/llvm-project#MMMMM.

@iMostfa iMostfa force-pushed the feature/SR-9615-escaping-and-inout-support branch from eb50eeb to f25776b Compare June 9, 2024 21:37
@iMostfa iMostfa changed the title PoC support for removing escaping when added Remove escaping from inout closuers Jun 9, 2024
@iMostfa iMostfa force-pushed the feature/SR-9615-escaping-and-inout-support branch from f25776b to 3bb218b Compare June 9, 2024 21:58
@iMostfa iMostfa closed this Jun 9, 2024
iMostfa pushed a commit that referenced this pull request Jul 19, 2024
This inserts a suitably named function into the stack trace whenever
a dynamic cast failure involves a NULL source or target type.
Very often, crash logs include backtraces with function names but
no log output; with this change, such a backtrace might look like
the following -- note `TARGET_TYPE_NULL` in the function name
here to mark the missing type information:

```
 frame #0: __pthread_kill + 8
 frame #1: pthread_kill + 288
 frame #2: abort + 128
 frame #3: swift::fatalErrorv()
 frame #4: swift::fatalError()
 frame #5: swift_dynamicCastFailure_TARGET_TYPE_NULL()
 frame #6: swift::swift_dynamicCastFailure()
 frame swiftlang#7: ::swift_dynamicCast()
```

Resolves rdar://130630157
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants