2012-01-24 13:34:08 +08:00
|
|
|
// RUN: %clang_cc1 -verify -Wno-covered-switch-default %s
|
2010-10-02 06:05:14 +08:00
|
|
|
|
|
|
|
enum E {
|
|
|
|
one,
|
|
|
|
two,
|
|
|
|
three,
|
|
|
|
four
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
int test(enum E e)
|
|
|
|
{
|
|
|
|
switch (e)
|
|
|
|
{
|
|
|
|
case one:
|
|
|
|
return 7;
|
|
|
|
case two ... two + 1:
|
|
|
|
return 42;
|
|
|
|
case four:
|
|
|
|
return 25;
|
|
|
|
default:
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
}
|