Update diag() calls in validate_literals. (#1771)

This CL updates the diag() call in validate_literals to provide the
relevant instruction.
This commit is contained in:
dan sinclair 2018-08-01 12:41:46 -04:00 committed by GitHub
parent e1e20f1abe
commit 72766d9e88
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -85,7 +85,7 @@ spv_result_t LiteralsPass(ValidationState_t& _, const Instruction* inst) {
const bool signedness = operand.number_kind == SPV_NUMBER_SIGNED_INT;
if (!VerifyUpperBits(upper_word, remaining_value_bits, signedness)) {
return _.diag(SPV_ERROR_INVALID_VALUE)
return _.diag(SPV_ERROR_INVALID_VALUE, inst)
<< "The high-order bits of a literal number in instruction <id> "
<< inst->id() << " must be 0 for a floating-point type, "
<< "or 0 for an integer type with Signedness of 0, "