AutosarC++17_03-A7.2.1¶
An expression with enum underlying type shall only have values corresponding to the enumerators of the enumeration
Required inputs: IR, StaticSemanticAnalysis
Possible Messages
Key |
Text |
Severity |
Disabled |
|---|---|---|---|
asgn_interval_not_an_enumerator |
Possible assignment of value which does not correspond to an enumerator (values computed by the analysis are [{int1};{int2}], they contain e.g. {int0} which does not correspond to an enumerator) |
None |
False |
asgn_interval_out_of_enum_range |
Possible assignment of value outside the enumerators (values computed by the analysis are [{int0};{int1}]) |
None |
False |
asgn_not_an_enumerator |
Assignment of value {int0} which does not correspond to an enumerator |
None |
False |
asgn_out_of_enum_range |
Assignment of value {int0} outside the range of the enumerators |
None |
False |
conversion_creating_bad_enum_value |
Expression does not correspond to an enumerator in {} |
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
any_enum¶
any_enum : bool = True
enum_kinds¶
enum_kinds : EnumKinds = 'Any'
with_predicate_analysis¶
with_predicate_analysis : bool = True
Option Types¶
These types are used by options listed above:
EnumKinds¶
An enumeration.Any
Scoped
Unscoped_Unbased