xref: /llvm-project/clang/test/Sema/attr-nonblocking-sema.c (revision f03cb005eb4ba3c6fb645aca2228e907db8cd452)
1 // RUN: %clang_cc1 -fsyntax-only -verify -std=c89 %s
2 
3 // Tests for a few cases involving C functions without prototypes.
4 
noproto()5 void noproto() __attribute__((nonblocking)) // expected-error {{'nonblocking' function must have a prototype}}
6 {
7 }
8 
9 // This will succeed
10 void noproto(void) __attribute__((blocking));
11 
12 // A redeclaration isn't any different - a prototype is required.
13 void f1(void);
14 void f1() __attribute__((nonblocking)); // expected-error {{'nonblocking' function must have a prototype}}
15