mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-05-02 08:01:11 +03:00
Give error messages for invalid casts.
This required passing Loc information to certain functions. Fixes nocompile/b/bug_cgcs_354_A/B.
This commit is contained in:
parent
a278651178
commit
907a03a3be
11 changed files with 133 additions and 129 deletions
|
@ -793,7 +793,7 @@ DValue* DtoArgument(Argument* fnarg, Expression* argexp)
|
|||
{
|
||||
LLValue* alloc = new llvm::AllocaInst(DtoType(argexp->type), "tmpparam", gIR->topallocapoint());
|
||||
DVarValue* vv = new DVarValue(argexp->type, alloc, true);
|
||||
DtoAssign(vv, arg);
|
||||
DtoAssign(argexp->loc, vv, arg);
|
||||
arg = vv;
|
||||
}
|
||||
|
||||
|
@ -807,7 +807,7 @@ void DtoVariadicArgument(Expression* argexp, LLValue* dst)
|
|||
Logger::println("DtoVariadicArgument");
|
||||
LOG_SCOPE;
|
||||
DVarValue vv(argexp->type, dst, true);
|
||||
DtoAssign(&vv, argexp->toElem(gIR));
|
||||
DtoAssign(argexp->loc, &vv, argexp->toElem(gIR));
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue