summaryrefslogtreecommitdiffstats
path: root/test/SemaCXX/anonymous-union-export.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/SemaCXX/anonymous-union-export.cpp')
-rw-r--r--test/SemaCXX/anonymous-union-export.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/test/SemaCXX/anonymous-union-export.cpp b/test/SemaCXX/anonymous-union-export.cpp
index 1d83d809f5..689c6b9f17 100644
--- a/test/SemaCXX/anonymous-union-export.cpp
+++ b/test/SemaCXX/anonymous-union-export.cpp
@@ -1,6 +1,7 @@
// RUN: %clang_cc1 -std=c++17 -fmodules-ts -emit-obj -verify -o %t.pcm %s
export module M;
-export {
- union { bool a; }; // expected-error{{anonymous unions at namespace or global scope must be declared 'static'}}
+export { // expected-note 2{{export block begins here}}
+ union { bool a; }; // expected-error {{anonymous unions at namespace or global scope must be declared 'static'}} expected-error {{declaration of 'a' with internal linkage cannot be exported}}
+ static union { bool a; }; // expected-error {{declaration of 'a' with internal linkage cannot be exported}}
}