-
Notifications
You must be signed in to change notification settings - Fork 341
[BoundsSafety] Parse external bounds attributes in ObjC methods #10068
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
[BoundsSafety] Parse external bounds attributes in ObjC methods #10068
Conversation
This parses counted_by et. al. for parameters and return types in Objective-C method signatures. No semantic checking is done to ensure that protocol, interface and implementation are aligned. rdar://145190177
@swift-ci please smoke test |
@swift-ci please test llvm |
@swift-ci please smoke test |
1 similar comment
@swift-ci please smoke test |
clang/test/BoundsSafety/AST/objc.m
Outdated
// CHECK-NEXT: | |-ParmVarDecl {{.*}} len 'int' | ||
// CHECK-NOT: IsDeref | ||
// CHECK-NEXT: | | `-DependerDeclsAttr | ||
// CHECK-NEXT: | `-ParmVarDecl {{.*}} p 'int *{{(__single)?}} __counted_by(len)':'int *{{(__single)?}}' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't make thin pointers __single
in attribute-only modes, so the expected output should be different between the two modes.
By separating the check lines containing implicit __single, we explicitly check that attribute-only mode does not contain any implicit __single attributes, while -fbounds-safety does.
@swift-ci please smoke test |
@swift-ci please test llvm |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@swift-ci please test linux |
@swift-ci please test macos |
This parses counted_by et. al. for parameters and return types in Objective-C method signatures. No semantic checking is done to ensure that protocol, interface and implementation are aligned.
rdar://145190177