- Inlining location when accessing #foo symbols.

- Improve inlined-at when checking generic code.
This commit is contained in:
Christoffer Lerno
2025-09-04 11:39:48 +02:00
parent cf14787552
commit 29e20ee1be
8 changed files with 53 additions and 23 deletions

View File

@@ -592,6 +592,17 @@ void sema_print_inline(SemaContext *context, SourceSpan original)
}
inlined_at = inlined_at->prev;
}
InliningSpan span = context->compilation_unit->module->inlined_at;
if (span.span.a == INVALID_SPAN.a) return;
inlined_at = &span;
while (inlined_at)
{
if (inlined_at->span.a != original.a)
{
sema_note_prev_at(inlined_at->span, "Inlined from here.");
}
inlined_at = inlined_at->prev;
}
}
void sema_error_at(SemaContext *context, SourceSpan span, const char *message, ...)