-
Notifications
You must be signed in to change notification settings - Fork 10.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make c++ defer looks like a swift one #166
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@przybylski , please find the author of this code (using git blame) and invite them to review this code (by using their github handle name) |
@lattner could you have a look on this PR? |
I prefer the function to macro trickery, honestly. Neat trick though. |
lattner
added a commit
that referenced
this pull request
Dec 6, 2015
Make c++ defer looks like a swift one
Simultaneously cute and horrible :-) - looks great, thanks! |
slavapestov
pushed a commit
to slavapestov/swift
that referenced
this pull request
Nov 27, 2018
handle EWOULDBLOCK error in _dispatch_operation_perform
slavapestov
pushed a commit
to slavapestov/swift
that referenced
this pull request
Nov 27, 2018
handle EWOULDBLOCK error in _dispatch_operation_perform Signed-off-by: Daniel A. Steffen <dsteffen@apple.com>
dabelknap
pushed a commit
to dabelknap/swift
that referenced
this pull request
Dec 5, 2018
Add support for deinitializers
This was referenced Oct 10, 2020
maldahleh
pushed a commit
to maldahleh/swift
that referenced
this pull request
Oct 26, 2020
Add a change log describing the changes since the Swift 5.1 release
freak4pc
pushed a commit
to freak4pc/swift
that referenced
this pull request
Sep 28, 2022
XFAIL Vapor due to SR-7233.
DougGregor
pushed a commit
to DougGregor/swift
that referenced
this pull request
Apr 28, 2024
…Targett-to-SignBundle Add DependsOnTargets to SignBundle insignia target
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This code uses some c++ trickery to make defer macro looks almost like defer keyword in swift.
Instad of:
coders can now drop some boilerplate and do this:
But this changes capture list to all values by reference