AutosarC++17_10-A15.5.1

All user-provided class destructors, deallocation functions, move constructors, move assignment operators and swap functions shall not exit with an exception. A noexcept exception specification shall be added to these functions as appropriate

Required inputs: IR, StaticSemanticAnalysis

Possible Messages

Key

Text

Severity

Disabled

routine_may_except

Function must not exit with an exception.

None

False

routine_not_noexcept

Function shall be explicitly declared noexcept if appropriate.

None

False

Options

allow_implicit_noexcept_on_destructors

allow_implicit_noexcept_on_destructors : bool = False

Whether to omit a violation on destructors if no explicit noexcept specification exists. The Autosar C++ guidelines releases until/including 17-10 required an explicit noexcept. Since the Autosar C++ guidelines release 18-03 one may include an explicit noexcept specification, but it is clear from the associated example that it is no longer required.
 

exclude_exception_base_classes

exclude_exception_base_classes : set[bauhaus.analysis.config.QualifiedName] = set()

Exclude issues for the exception types mentioned in this set of qualified names. Also excludes classes derived from those class names as well as pointers or references to any of these class types.
 

generate_violation_path

generate_violation_path : bool = True

Whether to compute a trace for the exception. This improves the usability of the violation description, but requires additional computing which might slow down the rule.