mirror of
https://github.com/intel/llvm.git
synced 2026-02-05 04:46:27 +08:00
Assert that a call argument is a gl-value iff the parameter is a reference type.
llvm-svn: 138639
This commit is contained in:
@@ -1431,6 +1431,9 @@ void CodeGenFunction::EmitCallArg(CallArgList &args, const Expr *E,
|
||||
return emitWritebackArg(*this, args, CRE);
|
||||
}
|
||||
|
||||
assert(type->isReferenceType() == E->isGLValue() &&
|
||||
"reference binding to unmaterialized r-value!");
|
||||
|
||||
if (type->isReferenceType())
|
||||
return args.add(EmitReferenceBindingToExpr(E, /*InitializedDecl=*/0),
|
||||
type);
|
||||
|
||||
Reference in New Issue
Block a user