diff options
Diffstat (limited to 'test/SemaCXX/modules-ts.cppm')
-rw-r--r-- | test/SemaCXX/modules-ts.cppm | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/test/SemaCXX/modules-ts.cppm b/test/SemaCXX/modules-ts.cppm index 2ea4958bffda..c07ee82e313c 100644 --- a/test/SemaCXX/modules-ts.cppm +++ b/test/SemaCXX/modules-ts.cppm @@ -1,7 +1,7 @@ -// RUN: %clang_cc1 -std=c++1z -fmodules-ts -emit-module-interface %s -o %t.pcm -verify -DTEST=0 -// RUN: %clang_cc1 -std=c++1z -fmodules-ts -emit-module-interface %s -o %t.pcm -verify -DTEST=1 -// RUN: %clang_cc1 -std=c++1z -fmodules-ts -emit-module-interface %s -fmodule-file=%t.pcm -o %t.pcm -verify -DTEST=2 -// RUN: %clang_cc1 -std=c++1z -fmodules-ts -emit-module-interface %s -fmodule-file=%t.pcm -o %t.pcm -verify -Dfoo=bar -DTEST=3 +// RUN: %clang_cc1 -std=c++1z -fmodules-ts -emit-module-interface %s -o %t.0.pcm -verify -DTEST=0 +// RUN: %clang_cc1 -std=c++1z -fmodules-ts -emit-module-interface %s -o %t.1.pcm -verify -DTEST=1 +// RUN: %clang_cc1 -std=c++1z -fmodules-ts -emit-module-interface %s -fmodule-file=%t.0.pcm -o %t.2.pcm -verify -DTEST=2 +// RUN: %clang_cc1 -std=c++1z -fmodules-ts -emit-module-interface %s -fmodule-file=%t.0.pcm -o %t.3.pcm -verify -Dfoo=bar -DTEST=3 #if TEST == 0 // expected-no-diagnostics @@ -14,14 +14,14 @@ export module foo; #endif static int m; -#if TEST == 2 // FIXME: 'm' has internal linkage, so there should be no error here +#if TEST == 2 // expected-error@-2 {{redefinition of '}} // expected-note@-3 {{unguarded header; consider using #ifdef guards or #pragma once}} // FIXME: We should drop the "header from" in this diagnostic. // expected-note-re@modules-ts.cppm:1 {{'{{.*}}modules-ts.cppm' included multiple times, additional include site in header from module 'foo'}} #endif int n; -#if TEST >= 2 +#if TEST == 2 // expected-error@-2 {{redefinition of '}} // expected-note@-3 {{unguarded header; consider using #ifdef guards or #pragma once}} // FIXME: We should drop the "header from" in this diagnostic. @@ -52,15 +52,11 @@ export {} // expected-error {{export declaration cannot be empty}} export { ; } export { static_assert(true); } -// FIXME: These diagnostics are not very good. -export import foo; // expected-error {{expected unqualified-id}} -export { import foo; } // expected-error {{expected unqualified-id}} - int use_b = b; int use_n = n; // FIXME: this should not be visible, because it is not exported extern int n; -static_assert(&n == p); // FIXME: these are not the same entity +static_assert(&n != p); #endif |