mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-26 05:46:06 +00:00

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 tenth batch of tests being updated (there are a significant number of other tests left to be updated).
22 lines
573 B
C
22 lines
573 B
C
// RUN: %clang_cc1 -emit-llvm -triple x86_64 %s -o - | FileCheck %s --check-prefixes=CHECK,CUSED
|
|
// RUN: %clang_cc1 -emit-llvm -triple x86_64-apple-darwin %s -o - | FileCheck %s --check-prefixes=CHECK,USED
|
|
|
|
// USED: @llvm.used =
|
|
// CUSED: @llvm.compiler.used =
|
|
// CHECK-SAME: @f0
|
|
// CHECK-SAME: @f1.l0
|
|
// CHECK-SAME: @g0
|
|
// CHECK-SAME: @a0
|
|
|
|
int g0 __attribute__((used));
|
|
|
|
static void __attribute__((used)) f0(void) {
|
|
}
|
|
|
|
void f1(void) {
|
|
static int l0 __attribute__((used)) = 5225;
|
|
}
|
|
|
|
__attribute__((used)) int a0;
|
|
void pr27535(void) { (void)a0; }
|