13 lines · cpp
1// Based on C++20 10.2 example 4.2 3// RUN: %clang_cc1 -std=c++20 -emit-module-interface %s -verify -o %t4 5export module M;6 7struct S { // expected-note {{previous declaration is here}}8 int n;9};10typedef S S;11export typedef S S; // OK, does not redeclare an entity12export struct S; // expected-error {{cannot export redeclaration 'S' here since the previous declaration has module linkage}}13