Files
clang-p2996/clang/test/CodeGen/X86/fp-eval-method.c
Aaron Ballman 1c2558021c Use functions with prototypes when appropriate; NFC
A significant number of our tests in C accidentally use functions
without prototypes. This patch converts the function signatures to have
a prototype for the situations where the test is not specific to K&R C
declarations. e.g.,

  void func();

becomes

  void func(void);

This is the final batch of tests being updated to add prototypes,
hopefully.
2022-02-24 15:30:13 -05:00

21 lines
561 B
C

// RUN: %clang_cc1 -triple i386-unknown-netbsd6 -emit-llvm -o - %s \
// RUN: | FileCheck %s -check-prefixes=CHECK
// RUN: %clang_cc1 -triple i386-unknown-netbsd7 -emit-llvm -o - %s \
// RUN: | FileCheck %s -check-prefixes=CHECK-EXT
// RUN: %clang_cc1 -triple i386--linux -emit-llvm -o - %s \
// RUN: | FileCheck %s -check-prefixes=CHECK-EXT
float f(float x, float y) {
// CHECK: define{{.*}} float @f
// CHECK: fadd float
return 2.0f + x + y;
}
int getEvalMethod(void) {
// CHECK: ret i32 1
// CHECK-EXT: ret i32 2
return __FLT_EVAL_METHOD__;
}