[clang-tools-extra] [clang-tidy][NFC] Clarify switch-missing-default-case doc (#164699) (PR #164709)

2025-10-22 Thread Keith Thompson via cfe-commits
Keith-S-Thompson wrote: Yes, the defined behavior is the same in C++ as it is in C. Quoting a draft of the ISO C++ standard, section [stmt.switch], emphasis added: > When the `switch` statement is executed, its condition is evaluated and > compared with each case constant. If one of the case c

[clang-tools-extra] [clang-tidy][NFC] Clarify switch-missing-default-case doc (#164699) (PR #164709)

2025-10-22 Thread Keith Thompson via cfe-commits
https://github.com/Keith-S-Thompson created https://github.com/llvm/llvm-project/pull/164709 Falling through a defaultless switch statement has well defined behavior. Credit for noticing this problem goes to user "pozz" on comp.lang.c, Message-ID: <[email protected]> >From 28362