summaryrefslogtreecommitdiffstats
path: root/tests/query/highlights/cpp/enums-as-constants.cpp
blob: ae773e8d38903e145a5dadd238cd3a16b77a68f8 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
enum class Foo{
    a,
//  ^ @constant
    aa,
//  ^ @constant
    C,
//  ^ @constant
};

void foo(Foo f){
    switch ( f ) {
        case Foo::a:
         //  ^ @type
         //   ^ @namespace
         //       ^ @constant
            break;
        case Foo::aa:
         //        ^ @constant
            break;
        case Foo::C:
         //       ^ @constant
            break;
        default:
    }
}