28 lines · cpp
1// RUN: %clang_cc1 -std=c++20 -triple x86_64-unknown-linux-gnu -fclangir -emit-cir %s -o %t.cir2// RUN: FileCheck %s --input-file=%t.cir3 4enum Numbers {5 Zero,6 One,7 Two,8 Three9};10 11int f() {12 return Numbers::One;13}14 15// CHECK: cir.func{{.*}} @_Z1fv16// CHECK: cir.const #cir.int<1> : !u32i17 18namespace test {19 using enum Numbers;20};21 22int f2() {23 return test::Two;24}25 26// CHECK: cir.func{{.*}} @_Z2f2v27// CHECK: cir.const #cir.int<2> : !u32i28