mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-27 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);
8 lines
169 B
Common Lisp
8 lines
169 B
Common Lisp
// RUN: %clang_cc1 %s -verify -pedantic -fsyntax-only
|
|
|
|
int constant c[3] = {0};
|
|
|
|
void foo(void) {
|
|
c[0] = 1; //expected-error{{read-only variable is not assignable}}
|
|
}
|