bolt/deps/llvm-18.1.8/clang/test/SemaCXX/anonymous-union-export.cpp
2025-02-14 19:21:04 +01:00

7 lines
445 B
C++

// RUN: %clang_cc1 -std=c++20 -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 b; }; // expected-error {{declaration of 'b' with internal linkage cannot be exported}}
}