================
@@ -58,8 +58,13 @@ class SARIFDiagnosticPrinter : public DiagnosticConsumer {
void HandleDiagnostic(DiagnosticsEngine::Level Level,
const Diagnostic &Info) override;
+ static std::unique_ptr<SARIFDiagnosticPrinter>
+ create(ArrayRef<std::pair<StringRef, StringRef>> Config,
+ DiagnosticOptions &DiagOpts, DiagnosticsEngine &Diags);
+
private:
- raw_ostream &OS;
+ std::string FilePath;
----------------
AaronBallman wrote:
I guess I would have expected the printer object to have the stream we're
printing to instead of having to do path management (I was expecting the places
using the diagnostic printer would be responsible for figuring out what to
open).
This way the caller can handle failures from things like file permissions, etc
instead of making the printer do it. WDYT?
https://github.com/llvm/llvm-project/pull/185201
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits