template <typename T>
std::string ValidateBase<T>::getDiagnosticString() {
- return std::string(diagnostic_->error);
+ return diagnostic_ == nullptr ?
+ std::string() : std::string(diagnostic_->error);
}
template <typename T>
template <typename T>
spv_position_t ValidateBase<T>::getErrorPosition() {
- return diagnostic_->position;
+ return diagnostic_ == nullptr ? spv_position_t() : diagnostic_->position;
}
template class spvtest::ValidateBase<bool>;