// The intention of this file to check we could only export declarations in namesapce scope.
//
// RUN: %clang_cc1 -std=c++20 %s -verify
export module X;
export
;
export X<T>::iterator; // expected-error {{cannot export 'iterator' as it is not at namespace scope}}
export void ; // expected-error {{cannot export 'foo' as it is not at namespace scope}}
export U ; // expected-error {{cannot export 'bar' as it is not at namespace scope}}
export ;
export ; // expected-error {{cannot export 'iterator' as it is not at namespace scope}}
export void ; // expected-error {{cannot export 'foo' as it is not at namespace scope}}
export U ; // expected-error {{cannot export 'bar' as it is not at namespace scope}}
export