AutosarC++17_10-A4.5.1¶
Expressions with type enum or enum class shall not be used as operands to built-in and overloaded operators other than the subscript operator [ ], the assignment operator =, the equality operators == and !=, the unary & operator, and the relational operators <, <=, >, >=
Required inputs: IR
Possible Messages
Key |
Text |
Severity |
Disabled |
|---|---|---|---|
enum_operand_outside_comparison |
Use of enum operand in arithmetic or similar context |
None |
False |
Options¶
This rule shares the following common options: exclude_in_macros, exclude_messages_in_system_headers, excludes, extend_exclude_to_macro_invocations, includes, justification_checker, languages, post_processing, provider, report_at, severity
The following places define options that affect this rule: Stylechecks, Analysis-GlobalOptions
allow_bitmask_type¶
allow_bitmask_type : bool = True
fully_qualified_bitmask_types¶
fully_qualified_bitmask_types
A set of fully qualified types that satisfy the "BitmaskType" concept. This has no effect if allow_bitmask_type is not enabled.Type: set[bauhaus.analysis.config.QualifiedName]
Default:
{'std::_Codecvt_mode', 'std::_Iosb::_Fmtflags', 'std::_Iosb::_Iostate', 'std::_Iosb::_Openmode', 'std::ctype_base::mask', 'std::filesystem::copy_options', 'std::filesystem::directory_options', 'std::filesystem::perms', 'std::ios_base::fmtflags', 'std::ios_base::iostate', 'std::ios_base::openmode', 'std::launch', 'std::regex_constants::match_flag_type', 'std::regex_constants::syntax_option_type', 'std::regex_traits::char_class_type'}
report_use_in_operator_calls¶
report_use_in_operator_calls : bool = True