[Heikki Kultala] This patch contains the ABI changes for the TCE target.
[clang.git] / test / Parser / cxx-stmt.cpp
blobfdd573e6bfa5de2769935f697a7bf5655a7e0057
1 // RUN: %clang_cc1 -fsyntax-only -verify %s
3 void f1()
5 try {
7 } catch(int i) {
9 } catch(...) {
13 void f2()
15 try; // expected-error {{expected '{'}}
17 try {}
18 catch; // expected-error {{expected '('}}
20 try {}
21 catch (...); // expected-error {{expected '{'}}
23 try {}
24 catch {} // expected-error {{expected '('}}
27 void f3() try {
28 } catch(...) {
31 struct A {
32 int i;
33 A(int);
34 A(char);
35 A() try : i(0) {} catch(...) {}
36 void f() try {} catch(...) {}
37 A(float) : i(0) try {} // expected-error {{expected '{' or ','}}
40 A::A(char) : i(0) try {} // expected-error {{expected '{' or ','}}
41 A::A(int j) try : i(j) {} catch(...) {}
45 // PR5740
46 struct Type { };
48 enum { Type } Kind;
49 void f4() {
50 int i = 0;
51 switch (Kind) {
52 case Type: i = 7; break; // no error.
56 // PR5500
57 void f5() {
58 asm volatile ("":: :"memory");
59 asm volatile ("": ::"memory");