// RUN: %clang_cc1 -std=c++2a %s -verify -pedantic-errors
export module p3;
// expected-note 2{{target}}
// An exported declaration shall declare at least one name.
export; // expected-error {{empty declaration cannot be exported}}
export static_assert; // expected-error {{static_assert declaration cannot be exported}}
export using namespace A; // expected-error {{ISO C++20 does not permit using directive to be exported}}
export
export ; // expected-error {{must be class member}} expected-error {{GNU extension}} expected-error {{does not declare anything}}
export struct_;
export ; // expected-error {{must be declared 'static'}} expected-error {{does not declare anything}}
export union_;
export ; // expected-error {{does not declare anything}}
export enum_;
export ;
export typedef int; // expected-error {{typedef requires a name}}
export static ; // expected-error {{does not declare anything}}
export asm; // expected-error {{asm declaration cannot be exported}}
export ;
export using A::ns_mem; // expected-error {{using declaration referring to 'ns_mem' with module linkage cannot be exported}}
export using Int = int;
export extern "C++" // expected-error {{ISO C++20 does not permit a declaration that does not introduce any names to be exported}}
export extern "C++" // expected-error {{ISO C++20 does not permit a declaration that does not introduce any names to be exported}}
export extern "C++"
export
export ; // FIXME (bad diagnostic text): expected-error {{empty declaration cannot be exported}}
export ; // FIXME: expected-error {{empty declaration cannot be exported}} expected-warning {{unknown attribute 'attr'}}
// [...] shall not declare a name with internal linkage
export static int a; // expected-error {{declaration of 'a' with internal linkage cannot be exported}}
export static int ; // expected-error {{declaration of 'b' with internal linkage cannot be exported}}
export // expected-error {{declaration of 'c' with internal linkage cannot be exported}}
export static int e; // expected-error {{declaration of 'e' with internal linkage cannot be exported}}
export static int ; // expected-error {{declaration of 'f' with internal linkage cannot be exported}}
export const int k = 5;
export static ; // expected-error {{declaration of 'n' with internal linkage cannot be exported}}