-
Notifications
You must be signed in to change notification settings - Fork 352
[BoundsSafety] Fix diagnostics test failures #10528
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
Conversation
In fceb9ce upstream changed the diagnostic engine to always wrap expressions in single quotes. We already had manual wrapping for most of those, so the manual single quotes needed to be removed. In other placed the test cases needed to be updated to reflect the new output. rdar://149359009
|
@swift-ci please test llvm |
delcypher
left a comment
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.
I think the double single quotes looks a little weird but I think we should land the test fixes first and debate this separately. These tests being broken is blocking me so I'd rather we just landed this.
| def err_bounds_safety_terminated_by_terminator_mismatch : Error< | ||
| "array '%0' with '__terminated_by' attribute is initialized with an " | ||
| "incorrect terminator (expected: %1; got %2)">; | ||
| "incorrect terminator (expected: %quoted1; got %quoted2)">; |
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.
This seems new. Looking at the implementation it looks like this just adds single quotes around the argument. Presumably this is related to llvm#134769 (comment) and now we have double single quotes in the outputted diagnostics?
| // expected-error@+5{{array 'qux2.foo.a' with '__terminated_by' attribute is initialized with an incorrect terminator (expected: '0'; got '1')}} | ||
| // expected-error@+4{{array 'qux2.foo.b' with '__terminated_by' attribute is initialized with an incorrect terminator (expected: '42'; got '2')}} | ||
| // expected-error@+3{{array 'qux2.bar.a' with '__terminated_by' attribute is initialized with an incorrect terminator (expected: '0'; got '3')}} | ||
| // expected-error@+2{{array 'qux2.baz.a' with '__terminated_by' attribute is initialized with an incorrect terminator (expected: ''X''; got '0')}} |
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.
Ok so the character literal is double single quoted, and the integer literal is single quoted. It looks a little weird but I guess this is consistent with what upstream currently has.
|
For macOS @hnrklssn Are these failures unrelated? |
Upstream now folds (gep inbounds null, X) -> null. This updates our O2 tests to reflect the new output. Caused by 5a99355 (llvm#130742).
These seem unrelated, the others should be fixed now. Merging to unblock. |
In fceb9ce (llvm#134769) upstream changed the diagnostic engine to always wrap expressions in single quotes. We already had manual wrapping for most of those, so the manual single quotes needed to be removed. In other placed the test cases needed to be updated to reflect the new output.
rdar://149359009