Home | History | Annotate | Download | only in SemaCXX
      1 // RUN: %clang_cc1 %s -fsyntax-only -pedantic -verify
      2 
      3 void foo() {
      4   return foo();
      5 }
      6 
      7 // PR6451 - C++ Jump checking
      8 struct X {
      9   X();
     10 };
     11 
     12 void test2() {
     13   goto later;  // expected-error {{goto into protected scope}}
     14   X x;         // expected-note {{jump bypasses variable initialization}}
     15 later:
     16   ;
     17 }
     18 
     19 namespace PR6536 {
     20   struct A {};
     21   void a() { goto out; A x; out: return; }
     22 }
     23