mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-25 00:36: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 eighth batch of tests being updated (there are a significant number of other tests left to be updated).
19 lines
310 B
C
19 lines
310 B
C
// RUN: %clang_cc1 -emit-pch -o %t1.pch %s
|
|
// RUN: %clang_cc1 -emit-pch -o %t2.pch %s
|
|
// RUN: %clang_cc1 %s -include-pch %t1.pch -include-pch %t2.pch -verify
|
|
|
|
#ifndef HEADER
|
|
#define HEADER
|
|
|
|
extern int x;
|
|
|
|
#else
|
|
|
|
#warning parsed this
|
|
// expected-warning@-1 {{parsed this}}
|
|
int foo(void) {
|
|
return x;
|
|
}
|
|
|
|
#endif
|