Miscellaneous-NoCCasts

Do not use C-style casts in C++ code

Required inputs: IR

C++-style casts (static_cast, dynamic_cast, const_cast and reinterpret_cast) make the intended semantics of the cast clear to readers of the code.

Possible Messages

Key

Text

Severity

Disabled

c_cast

Use of C-style cast in C++ unit.

None

False

Options

allow_void_cast

allow_void_cast : bool = True

If true, (void) is always allowed, else only for return value of calls.
 

allow_void_cast_on_call

allow_void_cast_on_call : bool = True

If true, (void) is allowed, for return value of calls.