<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/90246>90246</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            Warning about a missing 'default’ label a switch statement
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            new issue
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          richardrom
      </td>
    </tr>
</table>

<pre>
    Hi, 

I’ve recently been testing Clang 18.x.x and notice that it produces a warning about a missing default label when using 
enum class when the _-Weverything_ flag is used. This was warning not produce using Clang 17. 
Weirdly enough, when you add the default label it now produces the warning _-Wcovered-switch-default_

The code can be easily seeing in compiler explorer.
This snippet is without using the default label
https://compiler-explorer.com/z/Mobxq3nzY
Using the default label:
https://compiler-explorer.com/z/Prde4zYrK


If in need of code:

```c++
enum class Enum {
    e1, e2, e3, e4
};


int test(Enum num) {
    switch(num) {
        case Enum::e1: return 0;
        case Enum::e2: return 1;
        case Enum::e3: return 2;
        case Enum::e4: return 3;
     //   default:;
    }
}
```
Compiler flags: -std=c++20 -Weverything -Wno-c++98-compat -Wno-missing-prototypes

Have I missed something in the C++ Standard??

</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyUVF-P4jYQ_zTOyygosQMkD3lgdw_dqapUqVehe1o58ZC4cmxqO7Dsp6_sBC70ujodsgxmfvOb_8Odk51GrMn6iaxfEj763tjayrbnVlgzJI0R1_qzJPQZSPZCst10fyGfKCkzUlVnBIstaq-u0CBq8Oi81B08K647yMvV2-oNuBagjZctgu-5B-nhZI0YW3TA4cKtDiq8MaMHDoN0LrwFHvmoPCjeoIJLjxrGKJicQD0O0Cru3CTzPcJresAz2qvvpe5e4ah4B9LB6FCs4GsvHVy4uxvU5u7HzDx7vV3NNg4orVBXQG3Grg9piKauZgQuRDT56KX0oM3le3QBcTP3mh5ac0aLInUX6ds-nXVfl7n92iO0RiC0XEODgNxJdQWHGDikhtYMJ6nQAr6dlLFoVzdF6cBpeTqhD0FfpO9DQqfIfnB1Uuq9PznCdoTuCd3fqNM7dWsGQvfvhO5_N83bP0y_f5sU__qAle1-lfgPK7B4_2Z_W2Zh7rNjCFgjCjDHmJU7_3xvsum0hD6F89_O-BR-ku0sAADAPJQRabxZvIuZbPtC2NOPXkjtY1sTWkY6PQ6EVo-sU0EJLf9PGD4tdxi9CRGwHeaE7cCiH62G7G72IzRdoPOfotkCTX-KLhZo9oieigdwq3HUWABCxu6peyzI9Hy-9WqYxNAOkDovCHuZ60UzWE4spAdt0llWlWloG-6nf-etkJ6s8cZfT-iWNfrMzwhf4upAAc4MOBHKaS88T5Twp-dacCsI24cTVRNRM1GxiidY59u8yNebfJ0lfd0W7XGdV2zN85KxTcMqPNJCUC6KYssbnsiaZrTICrrJS1pl1QqzIluX1ZZumxJZyUiR4cClWil1HlbGdol0bsS6ymixSeLAuLh8KdV4gSgklIZdbOugkzZj50iRKem8-87ipVdYHz7Ym4Rub_W6rel5O_G5T8F57nFA7ZPRqvpxVjvp-7GZBzSYnL9C5v_G1hO6j446QvcxkH8DAAD__0Nr7bI">