diff options
Diffstat (limited to 'test/CXX/basic/basic.lookup/basic.lookup.unqual/p15.cpp')
| -rw-r--r-- | test/CXX/basic/basic.lookup/basic.lookup.unqual/p15.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/test/CXX/basic/basic.lookup/basic.lookup.unqual/p15.cpp b/test/CXX/basic/basic.lookup/basic.lookup.unqual/p15.cpp index 253d15e90178..c59c4a550d7a 100644 --- a/test/CXX/basic/basic.lookup/basic.lookup.unqual/p15.cpp +++ b/test/CXX/basic/basic.lookup/basic.lookup.unqual/p15.cpp @@ -1,5 +1,4 @@ -// RUN: %clang_cc1 -fsyntax-only -verify %s -// XFAIL: * +// RUN: %clang_cc1 -fexceptions -fcxx-exceptions -fsyntax-only -verify %s class C { public: @@ -10,8 +9,13 @@ C::C(int a, // expected-note {{previous definition}} int b) // expected-note {{previous definition}} try { int c; - } catch (int a) { // expected-error {{redefinition of 'a'}} int b; // expected-error {{redefinition of 'b'}} ++c; // expected-error {{use of undeclared identifier 'c'}} } + +void f(int i) { + struct S { + void g() try {} catch (int i) {}; // OK + }; +} |
