Mercurial > hg > CbC > CbC_llvm
comparison clang/test/Sema/void_arg.c @ 150:1d019706d866
LLVM10
author | anatofuz |
---|---|
date | Thu, 13 Feb 2020 15:10:13 +0900 |
parents | |
children | c4bab56944e8 |
comparison
equal
deleted
inserted
replaced
147:c2174574ed3a | 150:1d019706d866 |
---|---|
1 /* RUN: %clang_cc1 -fsyntax-only %s -verify | |
2 */ | |
3 | |
4 typedef void Void; | |
5 | |
6 void foo() { | |
7 int X; | |
8 | |
9 X = sizeof(int (void a)); // expected-error {{argument may not have 'void' type}} | |
10 X = sizeof(int (int, void)); // expected-error {{must be the first and only parameter}} | |
11 X = sizeof(int (void, ...)); // expected-error {{must be the first and only parameter}} | |
12 | |
13 X = sizeof(int (Void a)); // expected-error {{argument may not have 'void' type}} | |
14 X = sizeof(int (int, Void)); // expected-error {{must be the first and only parameter}} | |
15 X = sizeof(int (Void, ...)); // expected-error {{must be the first and only parameter}} | |
16 | |
17 // Accept these. | |
18 X = sizeof(int (void)); | |
19 X = sizeof(int (Void)); | |
20 } | |
21 | |
22 // this is ok. | |
23 void bar(Void) { | |
24 } | |
25 | |
26 void f(const void); // expected-error {{parameter must not have type qualifiers}} |