brintos

brintos / llvm-project-archived public Read only

0
0
Text · 395 B · 793e996 Raw
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