Richard Smith | 8df390f | 2016-09-08 23:14:54 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -std=c++1z -fmodules-ts -emit-module-interface %s -o %t.pcm -verify |
Richard Smith | 145e15a | 2017-04-24 23:12:30 +0000 | [diff] [blame] | 2 | // RUN: %clang_cc1 -std=c++1z -fmodules-ts -emit-module-interface %s -o %t.pcm -verify -DERRORS |
Richard Smith | bbcc9f0 | 2016-08-26 00:14:38 +0000 | [diff] [blame] | 3 | |
Richard Smith | 81328ac | 2017-04-21 22:39:18 +0000 | [diff] [blame] | 4 | export module foo; |
Richard Smith | 8df390f | 2016-09-08 23:14:54 +0000 | [diff] [blame] | 5 | #ifndef ERRORS |
| 6 | // expected-no-diagnostics |
| 7 | #else |
Richard Smith | 81328ac | 2017-04-21 22:39:18 +0000 | [diff] [blame] | 8 | // FIXME: diagnose missing module-declaration when building module interface |
Richard Smith | bbcc9f0 | 2016-08-26 00:14:38 +0000 | [diff] [blame] | 9 | |
Richard Smith | 8df390f | 2016-09-08 23:14:54 +0000 | [diff] [blame] | 10 | // FIXME: proclaimed-ownership-declarations? |
| 11 | |
| 12 | export { |
| 13 | int a; |
| 14 | int b; |
| 15 | } |
| 16 | export int c; |
| 17 | |
| 18 | namespace N { |
| 19 | export void f() {} |
| 20 | } |
| 21 | |
| 22 | export struct T {} t; |
| 23 | |
| 24 | struct S { |
| 25 | export int n; // expected-error {{expected member name or ';'}} |
| 26 | export static int n; // expected-error {{expected member name or ';'}} |
| 27 | }; |
| 28 | void f() { |
| 29 | export int n; // expected-error {{expected expression}} |
| 30 | } |
Richard Smith | bbcc9f0 | 2016-08-26 00:14:38 +0000 | [diff] [blame] | 31 | #endif |