| 1 | // RUN: %clang_cc1 -fsyntax-only -verify %s |
|---|---|
| 2 | |
| 3 | void f() { |
| 4 | struct X { |
| 5 | static int a; // expected-error {{static data member 'a' not allowed in local class 'X'}} |
| 6 | int b; |
| 7 | |
| 8 | static void f() { } |
| 9 | }; |
| 10 | } |
| 11 |
| 1 | // RUN: %clang_cc1 -fsyntax-only -verify %s |
|---|---|
| 2 | |
| 3 | void f() { |
| 4 | struct X { |
| 5 | static int a; // expected-error {{static data member 'a' not allowed in local class 'X'}} |
| 6 | int b; |
| 7 | |
| 8 | static void f() { } |
| 9 | }; |
| 10 | } |
| 11 |