[clang][cli] NFC: Use Diags to report parsing success/failure
authorJan Svoboda <jan_svoboda@apple.com>
Fri, 16 Apr 2021 13:30:28 +0000 (15:30 +0200)
committerJan Svoboda <jan_svoboda@apple.com>
Mon, 19 Apr 2021 09:17:16 +0000 (11:17 +0200)
commit64e4dfd72b42ba76186c61a6e463a5f5cbb0340c
treec52030bece00b8a034a881735ae32af998f1432e
parent26bbb8700bb0ea0ce29e4158e5aa7999ab0d5386
[clang][cli] NFC: Use Diags to report parsing success/failure

`Success` is set to `false` whenever `Diags.Report(diag::err_)` is called. Remove the duplication and use `Diags` as the source of truth when deciding whether to report parsing success/failure.

Reviewed By: dexonsmith

Differential Revision: https://reviews.llvm.org/D100644
clang/lib/Frontend/CompilerInvocation.cpp