Daniel Dunbar | a572887 | 2009-12-15 20:14:24 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -fsyntax-only -verify -pedantic %s |
Chris Lattner | 04ae2df | 2009-07-12 21:18:45 +0000 | [diff] [blame] | 2 | |
| 3 | #pragma clang diagnostic pop // expected-warning{{pragma diagnostic pop could not pop, no matching push}} |
| 4 | |
Douglas Gregor | 6493a4d | 2010-08-30 15:15:34 +0000 | [diff] [blame] | 5 | #pragma clang diagnostic puhs // expected-warning {{pragma diagnostic expected 'error', 'warning', 'ignored', 'fatal', 'push', or 'pop'}} |
Chris Lattner | 04ae2df | 2009-07-12 21:18:45 +0000 | [diff] [blame] | 6 | |
John McCall | 091f23f | 2010-11-09 22:22:12 +0000 | [diff] [blame] | 7 | int a = 'df'; // expected-warning{{multi-character character constant}} |
Chris Lattner | 04ae2df | 2009-07-12 21:18:45 +0000 | [diff] [blame] | 8 | |
| 9 | #pragma clang diagnostic push |
| 10 | #pragma clang diagnostic ignored "-Wmultichar" |
| 11 | |
John McCall | 091f23f | 2010-11-09 22:22:12 +0000 | [diff] [blame] | 12 | int b = 'df'; // no warning. |
Chris Lattner | 04ae2df | 2009-07-12 21:18:45 +0000 | [diff] [blame] | 13 | #pragma clang diagnostic pop |
| 14 | |
John McCall | 091f23f | 2010-11-09 22:22:12 +0000 | [diff] [blame] | 15 | int c = 'df'; // expected-warning{{multi-character character constant}} |
Chris Lattner | 04ae2df | 2009-07-12 21:18:45 +0000 | [diff] [blame] | 16 | |
| 17 | #pragma clang diagnostic pop // expected-warning{{pragma diagnostic pop could not pop, no matching push}} |