Skip to content

[lldb] Remove redundant severity substring within a diagnostic message #8140

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

PortalPete
Copy link

This is a cherry-pick from llvm/llvm-project:

For example, the following message has the severity string "error: " twice.

"error: :3:1: error: cannot find 'bogus' in scope

This method already appends the severity string in the beginning, but with this fix, it also removes a secondary instance, if applicable.

Note that this change only removes the first redundant substring. I considered putting the removal logic in a loop, but I decided that if something is generating more than one redundant severity substring, then that's a problem the message's source should probably fix.

rdar://114203423

…e. (llvm#76111)

For example, the following message has the severity string "error: "
twice.
	> "error: <EXPR>:3:1: error: cannot find 'bogus' in scope

This method already appends the severity string in the beginning, but
with this fix, it also removes a secondary instance, if applicable.

Note that this change only removes the *first* redundant substring. I
considered putting the removal logic in a loop, but I decided that if
something is generating more than one redundant severity substring, then
that's a problem the message's source should probably fix.

rdar://114203423
@PortalPete
Copy link
Author

@swift-ci test

@adrian-prantl adrian-prantl merged commit 5bbdc64 into swiftlang:stable/20230725 Feb 7, 2024
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.

2 participants