summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordan sinclair <dj2@everburning.com>2018-08-01 12:41:46 -0400
committerGitHub <noreply@github.com>2018-08-01 12:41:46 -0400
commit72766d9e8890f7112e0a1a706c475a3ed08a479c (patch)
treea1fee49b8f1ddffd6e3c238fc247c2d260b9f27c
parente1e20f1abef22ba27f5e51701b98cba25b71e6b6 (diff)
Update diag() calls in validate_literals. (#1771)
This CL updates the diag() call in validate_literals to provide the relevant instruction.
-rw-r--r--source/val/validate_literals.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/val/validate_literals.cpp b/source/val/validate_literals.cpp
index 0e4dbe37..53aae076 100644
--- a/source/val/validate_literals.cpp
+++ b/source/val/validate_literals.cpp
@@ -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, "