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

Never return uninhabited values at all #59639

Merged
merged 1 commit into from
Apr 4, 2019

Commits on Apr 3, 2019

  1. Never return uninhabited values at all

    Functions with uninhabited return values are already marked `noreturn`,
    but we were still generating return instructions for this. When running
    with `-C passes=lint`, LLVM prints:
    
        Unusual: Return statement in function with noreturn attribute
    
    The LLVM manual makes a stronger statement about `noreturn` though:
    
    > This produces undefined behavior at runtime if the function ever does
    dynamically return.
    
    We now emit an `abort` anywhere that would have tried to return an
    uninhabited value.
    cuviper committed Apr 3, 2019
    Configuration menu
    Copy the full SHA
    c2e0d7f View commit details
    Browse the repository at this point in the history