[PATCH] D95793: [clang][cli] Generate and round-trip language options

Jan Svoboda via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Feb 2 09:36:30 PST 2021


jansvoboda11 added inline comments.


================
Comment at: clang/lib/Frontend/CompilerInvocation.cpp:1196
                                 const std::vector<std::string> &Sanitizers,
                                 DiagnosticsEngine &Diags, SanitizerSet &S) {
+  bool Success = true;
----------------
dexonsmith wrote:
> Can the caller use `Diags.hasErrorOccurred()` to avoid this change?
Not really, because the caller might have `Diags` that already contains some errors. We could compare the number of errors in `Diags` before and after calling this function. `DiagnosticsEngine` doesn't have API for that, but that could be added without much issues.

Do you have any specific reason for avoiding this change beyond minimizing the diff?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D95793/new/

https://reviews.llvm.org/D95793



More information about the cfe-commits mailing list