Skip to content

Commit

Permalink
[HLSL] Add test for export function redeclaration (llvm#97370)
Browse files Browse the repository at this point in the history
Related to llvm#92812
  • Loading branch information
hekota authored and aaryanshukla committed Jul 14, 2024
1 parent 66a1e1c commit 4185e69
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions clang/test/SemaHLSL/export.hlsl
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,12 @@ static void f9(); // expected-error {{static declaration of 'f9' follows non-sta
static void f10(); // expected-note {{previous declaration is here}}
export void f10(); // expected-error {{cannot export redeclaration 'f10' here since the previous declaration has internal linkage}}

export void f11();
void f11() {}

void f12(); // expected-note{{previous declaration is here}}
export void f12() {} // expected-error{{cannot export redeclaration 'f12' here since the previous declaration is not exported}}

export float V1; // expected-error {{export declaration can only be used on functions}}

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

0 comments on commit 4185e69

Please sign in to comment.