jansvoboda11 added inline comments.

================
Comment at: clang/lib/Frontend/CompilerInvocation.cpp:1400-1402
 bool clang::ParseDiagnosticArgs(DiagnosticOptions &Opts, ArgList &Args,
-                                DiagnosticsEngine *Diags,
+                                DiagnosticsEngine &Diags,
                                 bool DefaultDiagColor) {
----------------
dexonsmith wrote:
> Instead of this change (and updating callers), I suggest adding:
> ```
>   Optional<DiagnosticsEngine> IgnoredDiags;
>   if (!Diags) {
>     IgnoredDiags.emplace(new DiagnosticIDs(), new DiagnosticOptions(),
>                          new IgnoringDiagConsumer());
>     Diags = &*IgnoredDiags;
>   }
> ```
> 
That's a nice way to keep the signature intact. Thanks!


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D93701

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
  • [PATCH] D93701: [clang][cli] N... Jan Svoboda via Phabricator via cfe-commits

Reply via email to