Skip to content

Commit f4254f3

Browse files
authored
[HLSL] Add test for export function redeclaration (#97370)
Related to #92812
1 parent b2468d7 commit f4254f3

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

clang/test/SemaHLSL/export.hlsl

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,12 @@ static void f9(); // expected-error {{static declaration of 'f9' follows non-sta
3535
static void f10(); // expected-note {{previous declaration is here}}
3636
export void f10(); // expected-error {{cannot export redeclaration 'f10' here since the previous declaration has internal linkage}}
3737

38+
export void f11();
39+
void f11() {}
40+
41+
void f12(); // expected-note{{previous declaration is here}}
42+
export void f12() {} // expected-error{{cannot export redeclaration 'f12' here since the previous declaration is not exported}}
43+
3844
export float V1; // expected-error {{export declaration can only be used on functions}}
3945

4046
static export float V2; // expected-error{{expected unqualified-id}}

0 commit comments

Comments
 (0)