David Blaikie | 030c7e9 | 2012-04-15 22:09:44 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -Weverything -fsyntax-only %s -verify |
Ted Kremenek | 4cf2253 | 2012-03-19 23:48:41 +0000 | [diff] [blame] | 2 | |
| 3 | // This previously crashed due to a bug in the CFG. Exercising all |
| 4 | // warnings helps check CFG construction. |
| 5 | class PR12271 { |
| 6 | public: |
| 7 | PR12271(); |
| 8 | ~PR12271(); |
| 9 | }; |
| 10 | |
David Blaikie | 030c7e9 | 2012-04-15 22:09:44 +0000 | [diff] [blame] | 11 | void testPR12271() { // expected-warning {{no previous prototype for function 'testPR12271'}} |
| 12 | PR12271 a[1][1]; // expected-warning {{unused variable 'a'}} |
| 13 | } |