]> granicus.if.org Git - clang/commit
Implement -Wswitch-enum correctly.
authorDavid Blaikie <dblaikie@gmail.com>
Mon, 23 Jan 2012 04:46:12 +0000 (04:46 +0000)
committerDavid Blaikie <dblaikie@gmail.com>
Mon, 23 Jan 2012 04:46:12 +0000 (04:46 +0000)
commit585d7795c2dddaa510b3bb1b3b18633bfcfdf643
treebe446f95e0162eff5681a650b1ad437d898d7c7a
parentc14ec5a013883b891a71b0a112791693e9d1d1a8
Implement -Wswitch-enum correctly.

Clang previously implemented -Wswitch-enum the same as -Wswitch. This patch
corrects the behavior to match GCC's. The critical/only difference being that
-Wswitch-enum is not silenced by the presence of a default case in the switch.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148679 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/Basic/DiagnosticSemaKinds.td
lib/Sema/SemaStmt.cpp
test/Sema/switch-enum.c [new file with mode: 0644]