
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 seventh batch of tests being updated (there are a significant number of other tests left to be updated).
34 lines
793 B
C
34 lines
793 B
C
// RUN: %clang_cc1 -triple=x86_64-pc-win32 -verify -fopenmp -x c -std=c99 -fms-extensions -Wno-pragma-pack %s
|
|
// RUN: %clang_cc1 -triple=x86_64-pc-win32 -verify -fopenmp-simd -x c -std=c99 -fms-extensions -Wno-pragma-pack %s
|
|
|
|
// TODO: Issue an eror message as the end is missing
|
|
// expected-no-diagnostics
|
|
#pragma omp begin declare variant match(device={kind(cpu)})
|
|
int also_before(void) {
|
|
return 0;
|
|
}
|
|
|
|
#pragma omp begin declare variant match(device={kind(gpu)})
|
|
int also_after(void) {
|
|
return 2;
|
|
}
|
|
int also_before(void) {
|
|
return 2;
|
|
}
|
|
#pragma omp end declare variant
|
|
|
|
|
|
#pragma omp begin declare variant match(device={kind(fpga)})
|
|
|
|
This text is never parsed!
|
|
|
|
#pragma omp end declare variant
|
|
|
|
int also_after(void) {
|
|
return 0;
|
|
}
|
|
|
|
int test(void) {
|
|
return also_after() + also_before();
|
|
}
|