llvm-for-llvmta/tools/clang/test/Parser/ms-seh.c

25 lines
532 B
C
Raw Normal View History

2022-04-25 13:02:35 +02:00
// RUN: %clang_cc1 %s -fsyntax-only -Wmicrosoft -verify -fms-extensions
void f() {
int a;
__try a; // expected-error {{expected '{'}} expected-warning {{expression result unused}}
__try {
}
} // expected-error {{expected '__except' or '__finally' block}}
void g() {
int a;
__try {
} __except(1) a; // expected-error {{expected '{'}} expected-warning {{expression result unused}}
}
void h() {
int a;
__try {
} __finally a; // expected-error {{expected '{'}} expected-warning {{expression result unused}}
}