Merge pull request #1142 from Techatrix/iterate-asm

implement `iterateChildren` on asm
This commit is contained in:
Lee Cannon
2023-04-17 23:03:15 +01:00
committed by GitHub
2 changed files with 34 additions and 5 deletions

View File

@@ -120,6 +120,24 @@ test "references - label" {
);
}
test "references - asm" {
try testReferences(
\\fn foo(<0>: u32) void {
\\ asm ("bogus"
\\ : [ret] "={rax}" (-> void),
\\ : [bar] "{rax}" (<0>),
\\ );
\\}
);
try testReferences(
\\fn foo(comptime <0>: type) void {
\\ asm ("bogus"
\\ : [ret] "={rax}" (-> <0>),
\\ );
\\}
);
}
test "references - cross-file reference" {
if (true) return error.SkipZigTest; // TODO
try testMFReferences(&.{