[PATCH] D93701: [clang][cli] NFC: Make Diags optional in normalizer

2021-01-06 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 updated this revision to Diff 314866. jansvoboda11 added a comment. Instead of making Diags optional everywhere, pass an ignoring Diags into ParseDiagnosticArgs. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D93701/new/ https://reviews

[PATCH] D93701: [clang][cli] NFC: Make Diags optional in normalizer

2021-01-05 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith added a comment. In D93701#2477239 , @jansvoboda11 wrote: > This will make more sense after looking at D84673 > . In short: parsing of diagnostic options > can happen outside of `CompilerInvocation::createFrom

[PATCH] D93701: [clang][cli] NFC: Make Diags optional in normalizer

2021-01-05 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith added a comment. In D93701#2479574 , @jansvoboda11 wrote: > In D93701#2477239 , @jansvoboda11 > wrote: > >> Another solution would be to create a "dummy" `DiagnosticsEngine` for the >> `ParseDiagnostic

[PATCH] D93701: [clang][cli] NFC: Make Diags optional in normalizer

2021-01-05 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 added a comment. In D93701#2477239 , @jansvoboda11 wrote: > Another solution would be to create a "dummy" `DiagnosticsEngine` for the > `ParseDiagnosticArgs` calls, but I didn't find a way to do that. Something like `CompilerInstance::creat

[PATCH] D93701: [clang][cli] NFC: Make Diags optional in normalizer

2021-01-04 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 added a comment. This will make more sense after looking at 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

[PATCH] D93701: [clang][cli] NFC: Make Diags optional in normalizer

2020-12-22 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith added a comment. > This is needed for a future patch, where we start using normalizers in > contexts where no Diags are available. Can you explain what those contexts are? I'm wondering if they can be changed to create a `DiagnosticsEngine` instead of having to account for it being m

[PATCH] D93701: [clang][cli] NFC: Make Diags optional in normalizer

2020-12-22 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 created this revision. jansvoboda11 added reviewers: dexonsmith, Bigcheese. jansvoboda11 requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. This is needed for a future patch, where we start using normalizers in contexts where no