[clang] Implement lifetime analysis for lifetime_capture_by(X) (#115921)
[llvm-project.git] / clang / test / Sema / attr-nonblocking-sema.c
blob0647e47febef2000ce4841dfa9851b945633cef3
1 // RUN: %clang_cc1 -fsyntax-only -verify -std=c89 %s
3 // Tests for a few cases involving C functions without prototypes.
5 void noproto() __attribute__((nonblocking)) // expected-error {{'nonblocking' function must have a prototype}}
9 // This will succeed
10 void noproto(void) __attribute__((blocking));
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}}