Language server (finch lsp): diagnostics, hover, definition, completion, symbols, signature help; MSVC fix

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Nexoniarz 2026-10-08 21:58:01 +02:00
commit 5972d805aa
11 changed files with 809 additions and 59 deletions

View file

@ -75,7 +75,7 @@ void Codegen::declareStructs() {
s->name = name;
s->module = "C";
s->isC = true;
s->cdecl = &cs;
s->cstruct = &cs;
s->unsupported = cs.unsupported;
s->llvm = StructType::create(ctx, "c." + name);
cStructs[name] = s.get();
@ -249,7 +249,7 @@ AllocaInst *Codegen::slot(const FType &t, const std::string &name) {
Function *f = b.GetInsertBlock()->getParent();
IRBuilder<> entry(&f->getEntryBlock(), f->getEntryBlock().begin());
AllocaInst *a = entry.CreateAlloca(ty(t), nullptr, name);
if (t.kind == FType::Struct && t.info->isC) a->setAlignment(Align(t.info->cdecl->align));
if (t.kind == FType::Struct && t.info->isC) a->setAlignment(Align(t.info->cstruct->align));
return a;
}