[clang] Handle __declspec() attributes in using
[llvm-project.git] / clang / test / CXX / stmt.stmt / stmt.dcl / p3-0x.cpp
blobd7726c944cdb469be5707eb0f2f816b9c42749fc
1 // RUN: %clang_cc1 -std=c++11 -fsyntax-only -verify %s
3 // PR10034
4 struct X {};
6 void exx(X) {}
8 int test_ptr10034(int argc, char **argv)
10 if (argc > 3)
11 goto end;
13 X x;
14 X xs[16];
15 exx(x);
17 end:
18 if (argc > 1) {
19 for (int i = 0; i < argc; ++i)
24 return 0;
27 struct Y {
28 ~Y();
31 void f();
32 void test_Y() {
33 goto end; // expected-error{{cannot jump from this goto statement to its label}}
34 Y y; // expected-note{{jump bypasses variable with a non-trivial destructor}}
35 end:
36 f();
37 goto inner; // expected-error{{cannot jump from this goto statement to its label}}
39 Y y2; // expected-note{{jump bypasses variable with a non-trivial destructor}}
40 inner:
41 f();
43 return;
46 struct Z {
47 Z operator=(const Z&);
50 void test_Z() {
51 goto end;
52 Z z;
53 end:
54 return;