[PATCH] D4784: [clang-tidy] Add check for possibly incomplete switch statements
Shivam Gupta via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Jul 13 11:03:21 PDT 2023
xgupta marked an inline comment as done.
xgupta added inline comments.
================
Comment at: clang-tools-extra/docs/clang-tidy/checks/bugprone/switch-missing-default-case.rst:52
+.. note::
+ Enum types are already covered by compiler warnings when a switch statement
+ does not handle all enum values. This check focuses on non-enum types where
----------------
PiotrZSL wrote:
> xgupta wrote:
> > PiotrZSL wrote:
> > > would be nice to list them
> > Didn't understand, what should I list, non-enum types?
> No, not a types, compiler warnings (ones for enums). Simply so when user enable this check for integers, He/she could make sure that enum specific warnings are also enabled.
> and remove this list that you added, as you cannot do switch on pointers or floating point types.
I can see there is -Wswitch which I have mentioned.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D4784/new/
https://reviews.llvm.org/D4784
More information about the cfe-commits
mailing list