diff options
| author | Roman Divacky <rdivacky@FreeBSD.org> | 2010-03-03 17:28:16 +0000 |
|---|---|---|
| committer | Roman Divacky <rdivacky@FreeBSD.org> | 2010-03-03 17:28:16 +0000 |
| commit | 79ade4e028932fcb9dab15e2fb2305ca15ab0f14 (patch) | |
| tree | e1a885aadfd80632f5bd70d4bd2d37e715e35a79 /test/SemaCXX/statements.cpp | |
| parent | ecb7e5c8afe929ee38155db94de6b084ec32a645 (diff) | |
Notes
Diffstat (limited to 'test/SemaCXX/statements.cpp')
| -rw-r--r-- | test/SemaCXX/statements.cpp | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/test/SemaCXX/statements.cpp b/test/SemaCXX/statements.cpp index 36982582fa12..852086ed9a94 100644 --- a/test/SemaCXX/statements.cpp +++ b/test/SemaCXX/statements.cpp @@ -1,5 +1,17 @@ -// RUN: %clang_cc1 %s -fsyntax-only -pedantic +// RUN: %clang_cc1 %s -fsyntax-only -pedantic -verify void foo() { return foo(); } + +// PR6451 - C++ Jump checking +struct X { + X(); +}; + +void test2() { + goto later; // expected-error {{illegal goto into protected scope}} + X x; // expected-note {{jump bypasses variable initialization}} +later: + ; +} |
