Home | History | Annotate | Download | only in CodeGen
      1 // RUN: %clang -target i386-unknown-unknown -emit-llvm -S -o - %s | FileCheck %s
      2 
      3 const int AA = 5;
      4 
      5 // CHECK-LABEL: define i32 @f1
      6 int f1(enum {AA,BB} E) {
      7     // CHECK: ret i32 1
      8     return BB;
      9 }
     10 
     11 // CHECK-LABEL: define i32 @f2
     12 int f2(enum {AA=7,BB} E) {
     13     // CHECK: ret i32 7
     14     return AA;
     15 }
     16 
     17 // Check nested function declarators work.
     18 int f(void (*g)(), enum {AA,BB} h) {
     19     // CHECK: ret i32 0
     20     return AA;
     21 }
     22