Skip to content

bugprone-exception-escape generated for destructor marked with noexcept(false) #40583

@Flamefire

Description

@Flamefire
Bugzilla Link 41238
Version unspecified
OS Linux
CC @EugeneZelenko

Extended Description

There are use cases where a destructor is intended to throw under certain conditions. For an example see e.g. http://blog.sduto.it/2014/05/a-c-error-handling-style-that-plays.html

TLDR: A RAII style classed used to encapsulate a possible error conditions that throws an exception if the error occurred and is hence marked noexcept(false)

But clang-tidy still generates a bugprone-exception-escape in this situation which is a false positive.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions