• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // RUN: %clang_cc1 -fsyntax-only -verify %s
2 
3 int f();
4 
g()5 void g() {
6   if (int x = f()) { // expected-note 2{{previous definition}}
7     int x; // expected-error{{redefinition of 'x'}}
8   } else {
9     int x; // expected-error{{redefinition of 'x'}}
10   }
11 }
12 
13 
h()14 void h() {
15   if (int x = f()) // expected-note 2{{previous definition}}
16     int x; // expected-error{{redefinition of 'x'}}
17   else
18     int x; // expected-error{{redefinition of 'x'}}
19 }
20