HomePhabricator

[clang][Frontend] Add missing error handling

Authored by LemonBoy on Oct 22 2020, 2:13 PM.

Description

[clang][Frontend] Add missing error handling

Some early errors during the ASTUnit creation were not transferred to the FailedParseDiagnostic so when the code in LoadFromCommandLine swaps its content with the content of StoredDiagnostics they cannot be retrieved by the user in any way.

Reviewed By: andrewrk, dblaikie

Differential Revision: https://reviews.llvm.org/D78658

Details