dexonsmith added a comment. In D93701#2477239 <https://reviews.llvm.org/D93701#2477239>, @jansvoboda11 wrote:
> This will make more sense after looking at D84673 > <https://reviews.llvm.org/D84673>. In short: parsing of diagnostic options > can happen outside of `CompilerInvocation::createFromArgs`, that's why > `ParseDiagnosticArgs` is a free function. Ideally, we'd like to reuse the > existing marshalling infrastructure here as well. > > `ParseDiagnosticArgs` is usually called with `DiagnosticEngine *Diags = > nullptr`. That's because the call happens early on during compiler execution, > where we don't have a diagnostic engine yet. This call needs to happen first, > to obtain the diagnostic options that are necessary for the engine > instantiation. > > This patch accommodates this free function by turning all `DiagnosticEngine` > references to pointers. Another solution would be to create a "dummy" > `DiagnosticsEngine` for the `ParseDiagnosticArgs` calls, but I didn't find a > way to do that. Also, please try put this level of detail in the commit message. 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