llvm-project
df267d77 - [C] Add new -Wimplicit-int-enum-cast to -Wc++-compat (#137658)

Commit
233 days ago
[C] Add new -Wimplicit-int-enum-cast to -Wc++-compat (#137658) This introduces a new diagnostic group to diagnose implicit casts from int to an enumeration type. In C, this is valid, but it is not compatible with C++. Additionally, this moves the "implicit conversion from enum type to different enum type" diagnostic from `-Wenum-conversion` to a new group `-Wimplicit-enum-enum-cast`, which is a more accurate home for it. `-Wimplicit-enum-enum-cast` is also under `-Wimplicit-int-enum-cast`, as it is the same incompatibility (the enumeration on the right-hand is promoted to `int`, so it's an int -> enum conversion). Fixes #37027
Author
Parents
Loading