Lines Matching defs:diagnostic

29 #include "source/diagnostic.h"
93 // Otherwise returns an error code and issues a diagnostic.
95 spv_diagnostic* diagnostic);
108 // On failure, returns an error code and issues a diagnostic.
120 // issues a diagnostic.
141 // Returns a diagnostic stream object initialized with current position in
143 // returned object will be propagated to the current parse's diagnostic
145 spvtools::DiagnosticStream diagnostic(spv_result_t error) {
150 // Returns a diagnostic stream object with the default parse error code.
151 spvtools::DiagnosticStream diagnostic() {
153 return diagnostic(SPV_ERROR_INVALID_BINARY);
156 // Issues a diagnostic describing an exhaustion of input condition when
161 return diagnostic() << "End of input reached while decoding Op"
200 diagnostic(diagnostic_arg),
214 spv_diagnostic* diagnostic; // Where diagnostics go.
252 if (!_.words) return diagnostic() << "Missing module.";
255 return diagnostic() << "Module has incomplete header: only " << _.num_words
261 return diagnostic() << "Invalid SPIR-V magic number '" << std::hex
271 return diagnostic(SPV_ERROR_INTERNAL)
317 return diagnostic() << "Invalid instruction word count: "
322 return diagnostic() << "Invalid opcode: " << inst.opcode;
344 return diagnostic() << "Invalid instruction Op" << opcode_desc->name
364 return diagnostic() << "End of input reached while decoding Op"
371 return diagnostic() << "Invalid word count: Op" << opcode_desc->name
450 return diagnostic(SPV_ERROR_INVALID_ID) << "Error: Type Id is 0";
456 return diagnostic(SPV_ERROR_INVALID_ID) << "Error: Result Id is 0";
461 return diagnostic(SPV_ERROR_INVALID_ID)
473 if (!word) return diagnostic(SPV_ERROR_INVALID_ID) << "Id is 0";
481 return diagnostic(SPV_ERROR_INVALID_ID)
493 if (!word) return diagnostic() << spvOperandTypeStr(type) << " is 0";
508 return diagnostic()
522 return diagnostic()
527 return diagnostic(SPV_ERROR_INTERNAL)
566 return diagnostic() << "Invalid OpSwitch: selector id " << selector_id
574 return diagnostic() << "Invalid OpSwitch: selector id " << selector_id
581 return diagnostic() << "Invalid OpSwitch: selector id " << selector_id
611 return diagnostic() << "Literal string is longer than "
625 return diagnostic()
684 return diagnostic()
695 return diagnostic()
739 return diagnostic()
758 return diagnostic() << "Internal error: Unhandled operand type: " << type;
800 return diagnostic() << "Type Id " << type_id << " is not a type";
805 return diagnostic() << "Type Id " << type_id
840 spv_diagnostic* diagnostic) {
842 if (diagnostic) {
843 *diagnostic = nullptr;
844 spvtools::UseDiagnosticAsMessageConsumer(&hijack_context, diagnostic);
847 return parser.parse(code, num_words, diagnostic);