Sema: Disallow calling functions with certain special calling conventions.

This commit is contained in:
Alex Rønne Petersen
2024-10-28 21:57:29 +01:00
parent f508e22705
commit e4e3d7ab41
2 changed files with 32 additions and 5 deletions

View File

@@ -1,11 +1,11 @@
export fn entry() void {
foo();
}
fn foo() callconv(.Naked) void {}
fn foo() callconv(.naked) void {}
// error
// backend=llvm
// target=native
//
// :2:5: error: unable to call function with naked calling convention
// :2:5: error: unable to call function with calling convention 'naked'
// :4:1: note: function declared here