summaryrefslogtreecommitdiff
path: root/test/SemaCXX/anonymous-union-export.cpp
blob: 689c6b9f17e1c57ba3689f220941ffe7f426b737 (plain)
1
2
3
4
5
6
7
// RUN: %clang_cc1 -std=c++17 -fmodules-ts -emit-obj -verify -o %t.pcm %s

export module M;
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}}
}