1 // RUN: %clang_cc1 -std=c++11 -fsyntax-only -fcxx-exceptions -fexceptions -verify %s 2 3 void func1(int i) { // expected-note{{previous definition is here}} 4 int i; // expected-error{{redefinition of 'i'}} 5 } 6 7 void func2(int i) try { // expected-note{{previous definition is here}} 8 int i; // expected-error{{redefinition of 'i'}} 9 } catch (...) { 10 } 11 12 void func3(int i) try { // FIXME: note {{previous definition is here}} 13 } catch (int i) { // FIXME: error {{redefinition of 'i'}} 14 } 15 16 void func4(int i) try { // expected-note{{previous definition is here}} 17 } catch (...) { 18 int i; // expected-error{{redefinition of 'i'}} 19 } 20 21 void func5() try { 22 int i; 23 } catch (...) { 24 int j = i; // expected-error{{use of undeclared identifier 'i'}} 25 } 26 27 void func6() try { 28 } catch (int i) { // expected-note{{previous definition is here}} 29 int i; // expected-error{{redefinition of 'i'}} 30 } 31 32 void func7() { 33 try { 34 } catch (int i) { // expected-note{{previous definition is here}} 35 int i; // expected-error{{redefinition of 'i'}} 36 } 37 } 38