-
Notifications
You must be signed in to change notification settings - Fork 15.4k
[Clang] Add support for the C defer TS
#162848
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
Merged
+1,667
−8
Merged
Changes from 23 commits
Commits
Show all changes
41 commits
Select commit
Hold shift + click to select a range
a2f523c
[Clang] Add support for the C 'defer' TS
Sirraide 0a756c5
Implement codegen
Sirraide 2505774
Check gotos around defer
Sirraide 58a6c2d
Forbid break/continue/return/__leave out of defer
Sirraide 0a5c8fa
Jumping out of a scope that contains a defer is fine
Sirraide b9e845d
Add a bunch of tests
Sirraide 2eaecf5
Define __STDC_DEFER_TS25755__
Sirraide e74537c
Add test for 'defer defer'
Sirraide 11a40d0
Add test for 'main' since the TS mentions it explicitly
Sirraide bbf4389
Fix AST printer
Sirraide 3350e28
Add AST dump and serialisation test
Sirraide 40b449b
Add VLA test and rename -fdefer-ts -> -fexperimental-defer-ts
Sirraide 9706711
Add a SEH test
Sirraide d56cfb9
Add tests involving [[noreturn]] functions
Sirraide e51b68e
Forbid setjmp/longjmp within a defer statement
Sirraide 8948a46
clang-format
Sirraide b944bde
Test __builtin_setjmp/longjmp as well
Sirraide fbc4f5a
Remove assertion
Sirraide 65c2b88
Merge branch 'main' into defer
Sirraide 2eb59e3
-fexperimental-defer-ts -> -fdefer-ts
Sirraide d7fc314
Undo whitespace changes
Sirraide 62261b1
Use ShouldParseIf
Sirraide 7106167
Update test
Sirraide a0b19b8
Add release note
Sirraide e8f5982
Address some of Aaron’s comments
Sirraide 191b8f7
Add this horrible test case
Sirraide 48a0433
Add musttail test
Sirraide f117c4b
Allow attributes as an extension
Sirraide 48fc974
Add `_Defer`
Sirraide 6b041e8
Add stddefer.h and make 'defer' no longer a keyword
Sirraide 45c8113
Update stddefer.h
Sirraide 3a8741e
Merge branch 'main' into defer
Sirraide 004c40e
Move KEYDEFERTS to header
Sirraide 34ec829
I accidentally deleted KEYFIXEDPOINT...
Sirraide 0e238f1
Don't clobber the cleanup slot when emitting nested cleanups
Sirraide 24d7212
Add scope reentry test
Sirraide c18ac11
Address review feedback
Sirraide 53deeda
Merge branch 'main' into defer
Sirraide 2ace560
Update clang/test/Lexer/defer-keyword.cpp
Sirraide fd13abb
Save and restore the current cleanup destination
Sirraide 2965221
Merge branch 'main' into defer
Sirraide File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.