Stephen Hines | 651f13c | 2014-04-23 16:59:28 -0700 | [diff] [blame] | 1 | // RUN: %clang_cc1 -fsyntax-only -verify %s |
| 2 | |
| 3 | #define bool _Bool |
Pirama Arumuga Nainar | 3ea9e33 | 2015-04-08 08:57:32 -0700 | [diff] [blame] | 4 | int main(int argc, char** argv) |
Stephen Hines | 651f13c | 2014-04-23 16:59:28 -0700 | [diff] [blame] | 5 | { |
| 6 | bool signed; // expected-error {{'bool' cannot be signed or unsigned}} expected-warning {{declaration does not declare anything}} |
| 7 | |
| 8 | return 0; |
| 9 | } |
| 10 | #undef bool |
| 11 | |
| 12 | typedef int bool; |
| 13 | |
| 14 | int test2(int argc, char** argv) |
| 15 | { |
| 16 | bool signed; // expected-error {{'type-name' cannot be signed or unsigned}} expected-warning {{declaration does not declare anything}} |
| 17 | _Bool signed; // expected-error {{'_Bool' cannot be signed or unsigned}} expected-warning {{declaration does not declare anything}} |
| 18 | |
| 19 | return 0; |
| 20 | } |
| 21 | |