1 // RUN: %clang_cc1 -fsyntax-only -verify %s -std=c++11
2 
3 extern int a;
4 auto a = 0; // expected-note 2{{here}}
5 auto a = 0; // expected-error {{redefinition}}
6 int a = 0; // expected-error {{redefinition}}
7 extern auto a; // expected-error {{requires an initializer}}
8 
9 extern int b; // expected-note {{here}}
10 auto b = 0.0; // expected-error {{different type}}
11 
12 struct S {
13   static int a;
14   static int b; // expected-note {{here}}
15 };
16 
17 auto S::a = 0; // expected-note 2{{here}}
18 auto S::a; // expected-error {{redefinition}} expected-error {{requires an initializer}}
19 int S::a = 0; // expected-error {{redefinition}}
20 
21 auto S::b = 0.0; // expected-error {{different type}}
22 
f()23 void f() {
24   extern int a;
25   extern auto a; // expected-error {{requires an initializer}}
26 }
27