1 Commits

Author SHA1 Message Date
Shivam Gupta
42179bbf6b [clang-tidy] Add check for possibly incomplete switch statements
While clang warns about a possibly incomplete switch statement when switching over an enum variable and failing to cover all enum values (either explicitly or with a default case), no such warning is emitted if a plain integer variable is used as switch variable.

Add a clang-tidy check to diagnose these scenarios.

No fixit hint is provided since there are multiple possible solutions.

Differential Revision: https://reviews.llvm.org/D4784
2023-07-17 10:40:11 +05:30