Skip to content

Fixed faulty boolean logic #12965

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
merged 1 commit into from
Nov 12, 2019
Merged

Fixed faulty boolean logic #12965

merged 1 commit into from
Nov 12, 2019

Conversation

mattgallagher
Copy link
Contributor

This is a trivial logic error. The "abort" condition would be followed only if c == 0 with other clauses having no effect. The error was found by code inspection not testing; it is not associated with any known bugs or problems. You'd need to be demangling a non-conforming string to trigger it and the effort might not be worth it.

With the !c && clause dropped, the logic is in accordance with:
https://github.com/apple/swift/blob/master/docs/ABI/Mangling.rst
which states the the only valid chars at this point are n or b.

This is a trivial logic error. The "abort" condition would be followed only if `c == 0` with other clauses having no effect.
@CodaFi
Copy link
Contributor

CodaFi commented Nov 16, 2017

@swift-ci please smoke test

@CodaFi
Copy link
Contributor

CodaFi commented Nov 11, 2019

Hm, this should still be good.

@swift-ci please smoke test

@eeckstein
Copy link
Contributor

For testing: an invalid name would be 'ss4testCTeax_' (compared to the valid name of 'ss4testCTean_'

Copy link
Contributor

@eeckstein eeckstein left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@CodaFi
Copy link
Contributor

CodaFi commented Nov 12, 2019

⛵️

@CodaFi CodaFi merged commit 9bb4fc6 into swiftlang:master Nov 12, 2019
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.

3 participants