1 // RUN: %clang_cc1 -std=c++11 -fsyntax-only -verify %s
7 if (bool b
= true) // expected-note 2{{previous definition}}
8 bool b
; // expected-error {{redefinition}}
10 int b
; // expected-error {{redefinition}}
11 while (bool b
= true) // expected-note {{previous definition}}
12 int b
; // expected-error {{redefinition}}
13 for (int c
; // expected-note 2{{previous definition}}
14 bool c
= true;) // expected-error {{redefinition}}
15 double c
; // expected-error {{redefinition}}
16 switch (int n
= 37 + 5) // expected-note {{previous definition}}
17 int n
; // expected-error {{redefinition}}
18 for (int a
: arr
) // expected-note {{previous definition}}
19 int a
= 0; // expected-error {{redefinition}}
21 if (bool b
= true) { // expected-note 2{{previous definition}}
22 int b
; // expected-error {{redefinition}}
24 int b
; // expected-error {{redefinition}}
26 while (bool b
= true) { // expected-note {{previous definition}}
27 int b
; // expected-error {{redefinition}}
29 for (int c
; // expected-note 2{{previous definition}}
30 bool c
= true;) { // expected-error {{redefinition}}
31 double c
; // expected-error {{redefinition}}
33 switch (int n
= 37 + 5) { // expected-note {{previous definition}}
34 int n
; // expected-error {{redefinition}}
36 for (int &a
: arr
) { // expected-note {{previous definition}}
37 int a
= 0; // expected-error {{redefinition}}
40 if (bool b
= true) {{ // expected-note {{previous definition}}
43 int b
; // expected-error {{redefinition}}
45 if (bool b
= true) { // expected-note {{previous definition}}
46 bool b
; // expected-error {{redefinition}}
55 while (bool b
= true) {{
58 for (int c
; // expected-note {{previous definition}}
59 bool c
= true; ) {{ // expected-error {{redefinition}}
62 switch (int n
= 37 + 5) {{