mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-12-12 01:18:53 +00:00
a8bef8865e
This is a C++ feature that allows the use of `_` to declare multiple variable of that name in the same scope; these variables can then not be referred to. In addition, while P2169 does not extend to parameter declarations, we stop warning on unused parameters of that name, for consistency. The feature is backported to all C++ language modes. Reviewed By: #clang-language-wg, aaron.ballman Differential Revision: https://reviews.llvm.org/D153536
8 lines
445 B
C++
8 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}}
|
|
}
|