mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-25 10:16:07 +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 sixth batch of tests being updated (there are a significant number of other tests left to be updated).
15 lines
652 B
C
15 lines
652 B
C
// REQUIRES: asserts
|
|
|
|
// RUN: %clang_cc1 -mllvm -debug-only=codegenaction -clear-ast-before-backend %s -emit-obj -o /dev/null -O1 2>&1 | FileCheck %s --check-prefix=YES
|
|
// RUN: %clang_cc1 -mllvm -debug-only=codegenaction -clear-ast-before-backend -no-clear-ast-before-backend %s -emit-obj -o /dev/null -O1 2>&1 | FileCheck %s --allow-empty --check-prefix=NO
|
|
// RUN: %clang_cc1 -clear-ast-before-backend %s -emit-obj -o /dev/null -print-stats 2>&1 | FileCheck %s --check-prefix=STATS
|
|
|
|
// YES: Clearing AST
|
|
// NO-NOT: Clearing AST
|
|
// STATS: *** Decl Stats:
|
|
// STATS: {{.*}} decls total
|
|
// STATS: 1 Function decls
|
|
// STATS: Total bytes =
|
|
|
|
void f(void) {}
|