Remove TypeValidators (NFC in terms of the testsuite)

This is a half-implemented feature that as far as we can tell was
never used by anything since its original inclusion in 2014. This
patch removes it to make remaining the code easier to understand.

Differential Revision: https://reviews.llvm.org/D71310
This commit is contained in:
Adrian Prantl
2019-12-10 15:32:57 -08:00
parent 5a3a9e9927
commit ee64dfd953
26 changed files with 14 additions and 635 deletions

View File

@@ -75,8 +75,6 @@ bool ValueObjectPrinter::PrintValueObject() {
return false;
if (ShouldPrintValueObject()) {
PrintValidationMarkerIfNeeded();
PrintLocationIfNeeded();
m_stream->Indent();
@@ -94,8 +92,6 @@ bool ValueObjectPrinter::PrintValueObject() {
else
m_stream->EOL();
PrintValidationErrorIfNeeded();
return true;
}
@@ -790,37 +786,3 @@ void ValueObjectPrinter::PrintChildrenIfNeeded(bool value_printed,
} else
m_stream->EOL();
}
bool ValueObjectPrinter::ShouldPrintValidation() {
return m_options.m_run_validator;
}
bool ValueObjectPrinter::PrintValidationMarkerIfNeeded() {
if (!ShouldPrintValidation())
return false;
m_validation = m_valobj->GetValidationStatus();
if (TypeValidatorResult::Failure == m_validation.first) {
m_stream->Printf("! ");
return true;
}
return false;
}
bool ValueObjectPrinter::PrintValidationErrorIfNeeded() {
if (!ShouldPrintValidation())
return false;
if (TypeValidatorResult::Success == m_validation.first)
return false;
if (m_validation.second.empty())
m_validation.second.assign("unknown error");
m_stream->Printf(" ! validation error: %s", m_validation.second.c_str());
m_stream->EOL();
return true;
}