Douglas Gregor | 41b1d6b | 2010-04-19 21:31:25 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -fsyntax-only -verify %s |
Douglas Gregor | 63c323d | 2010-04-19 22:34:40 +0000 | [diff] [blame] | 2 | extern const int PR6495a = 42; |
| 3 | extern int PR6495b = 42; // expected-warning{{'extern' variable has an initializer}} |
Douglas Gregor | 66dd939 | 2010-04-22 14:36:26 +0000 | [diff] [blame] | 4 | extern const int PR6495c[] = {42,43,44}; |
John McCall | 379246d | 2011-03-26 02:09:52 +0000 | [diff] [blame] | 5 | |
Richard Smith | c7f8116 | 2013-03-18 22:52:47 +0000 | [diff] [blame] | 6 | extern struct Test1 {}; // expected-warning {{'extern' is not permitted on a declaration of a type}} |
John McCall | 379246d | 2011-03-26 02:09:52 +0000 | [diff] [blame] | 7 | extern "C" struct Test0 {}; // no warning |