28 lines · c
1// Test that we serialize the enum decl in the function prototype somehow.2// These decls aren't serialized quite the same way as parameters.3 4// Test this without pch.5// RUN: %clang_cc1 -include %s -emit-llvm -o - %s | FileCheck %s6 7// Test with pch.8// RUN: %clang_cc1 -emit-pch -o %t %s9// RUN: %clang_cc1 -include-pch %t -emit-llvm -o - %s | FileCheck %s10 11// CHECK-LABEL: define {{.*}}i32 @main()12// CHECK: ret i32 113 14#ifndef HEADER15#define HEADER16 17static inline __attribute__((always_inline)) int f(enum { x, y } p) {18 return y;19}20 21#else22 23int main(void) {24 return f(0);25}26 27#endif28