Serialization: Hoist the check for in-flight diagnostics in ASTReader::getInputFile...
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>
Thu, 12 Nov 2020 18:05:07 +0000 (13:05 -0500)
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>
Fri, 13 Nov 2020 18:26:37 +0000 (13:26 -0500)
commitd87fd096ac3eb27f376c0182ed5e3034ce240861
tree732de0480a4caa1784a4b03fc5ac3d4380dfc438
parent9a8bfe38350d85879474b365e035bae15566ae2c
Serialization: Hoist the check for in-flight diagnostics in ASTReader::getInputFile, NFC

This logic seems easier to follow without the `Error()` helper, and
checking `DiagnosticsEngine::isDiagnosticInFlight` just once up front.

Differential Revision: https://reviews.llvm.org/D91366
clang/include/clang/Serialization/ASTReader.h
clang/lib/Serialization/ASTReader.cpp