Home | History | Annotate | Download | only in Parser
      1 // RUN: %clang_cc1 %s -fsyntax-only -Wmicrosoft -verify -fms-extensions
      2 
      3 void f() {
      4   int a;
      5 
      6   __try a; // expected-error {{expected '{'}} expected-warning {{expression result unused}}
      7 
      8   __try {
      9   }
     10 } // expected-error {{expected '__except' or '__finally' block}}
     11 
     12 void g() {
     13   int a;
     14 
     15   __try {
     16   } __except(1) a; // expected-error {{expected '{'}} expected-warning {{expression result unused}}
     17 }
     18 
     19 void h() {
     20   int a;
     21 
     22   __try {
     23   } __finally a; // expected-error {{expected '{'}} expected-warning {{expression result unused}}
     24 }
     25