Skip to content
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

Make clang version parsing logic more robust #1996

Merged
merged 1 commit into from
Feb 15, 2021

Conversation

hlopko
Copy link
Contributor

@hlopko hlopko commented Feb 15, 2021

Previously the function assumed that the version number appeared in the
third word. This PR adds a heuristic - take the first word that starts
with a number.

This way we can also parse:

  • Debian clang version 11.0
  • Apple clang version 12.0.0

Previously the function assumed that the version number appeared in the
third word. This PR adds a heuristic - take the first word that starts
with a number.

This way we can also parse: `debian clang version 11.0` that my clang
reports.
@hlopko
Copy link
Contributor Author

hlopko commented Feb 15, 2021

r? @emilio

Copy link
Contributor

@emilio emilio left a comment

Choose a reason for hiding this comment

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

Makes sense, thanks!

@emilio emilio merged commit e92dcf2 into rust-lang:master Feb 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants