Skip to content

Conversation

@kennykerr
Copy link
Collaborator

Some tweaks for Clang conformance. As a bonus, the Clang compiler picked up a source bug.

}

[[noreturn]] inline void terminate() noexcept
inline void terminate() noexcept
Copy link
Member

Choose a reason for hiding this comment

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

Really? This one is surprising to me.

Copy link
Collaborator Author

@kennykerr kennykerr Jan 17, 2020

Choose a reason for hiding this comment

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

Yes, Clang can't tell that the function won't return and thus rejects the [[noreturn]]. Unfortunately, there seems to be no way to mark a lambda as [[noreturn]] and even if there were, I'm not sure Clang would "see through" the load_runtime_function function to observe this since the RoFailFastWithErrorContext function isn't [[noreturn]] due to its dynamic nature.

@kennykerr kennykerr merged commit 662ef58 into master Jan 17, 2020
@kennykerr kennykerr deleted the kennykerr-clang2 branch January 17, 2020 19:26
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