Skip to content

Make clang version parsing logic more robust#1996

Merged
emilio merged 1 commit into
rust-lang:masterfrom
hlopko:parse_clang_version
Feb 15, 2021
Merged

Make clang version parsing logic more robust#1996
emilio merged 1 commit into
rust-lang:masterfrom
hlopko:parse_clang_version

Conversation

@hlopko

@hlopko hlopko commented Feb 15, 2021

Copy link
Copy Markdown
Contributor

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

hlopko commented Feb 15, 2021

Copy link
Copy Markdown
Contributor Author

r? @emilio

@emilio emilio left a comment

Copy link
Copy Markdown
Contributor

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