summaryrefslogtreecommitdiff
path: root/clang/test/SemaCXX/gnu-case-ranges.cpp
blob: b082e3a6c1c0649ecf9cd486d6b662be4411ef6c (about) (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
// RUN: %clang_cc1 -verify -Wno-covered-switch-default %s

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;
    }
}