blob: 31de685ed35f7a94da3c9957f7b7129eb72b2735 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
// RUN: %clang_cc1 -fsyntax-only -verify %s
int f();
void g() {
if (int x = f()) { // expected-note 2{{previous definition}}
int x; // expected-error{{redefinition of 'x'}}
} else {
int x; // expected-error{{redefinition of 'x'}}
}
}
void h() {
if (int x = f()) // expected-note 2{{previous definition}}
int x; // expected-error{{redefinition of 'x'}}
else
int x; // expected-error{{redefinition of 'x'}}
}
|