diff --git a/clang/include/clang/Analysis/PathDiagnostic.h b/clang/include/clang/Analysis/PathDiagnostic.h --- a/clang/include/clang/Analysis/PathDiagnostic.h +++ b/clang/include/clang/Analysis/PathDiagnostic.h @@ -68,11 +68,11 @@ /// Whether to include additional information about macro expansions /// with the diagnostics, because otherwise they can be hard to obtain /// without re-compiling the program under analysis. - bool ShouldDisplayMacroExpansions; + bool ShouldDisplayMacroExpansions = false; /// Whether to include LLVM statistics of the process in the diagnostic. /// Useful for profiling the tool on large real-world codebases. - bool ShouldSerializeStats; + bool ShouldSerializeStats = false; /// If the consumer intends to produce multiple output files, should it /// use randomly generated file names for these files (with the tiny risk of @@ -82,21 +82,19 @@ /// because deterministic mode is always superior when done right, but /// for some consumers this mode is experimental and needs to be /// off by default. - bool ShouldWriteStableReportFilename; + bool ShouldWriteStableReportFilename = false; /// Whether the consumer should treat consumed diagnostics as hard errors. /// Useful for breaking your build when issues are found. - bool ShouldDisplayWarningsAsErrors; + bool ShouldDisplayWarningsAsErrors = false; /// Whether the consumer should attempt to rewrite the source file /// with fix-it hints attached to the diagnostics it consumes. - bool ShouldApplyFixIts; + bool ShouldApplyFixIts = false; /// Whether the consumer should present the name of the entity that emitted /// the diagnostic (eg., a checker) so that the user knew how to disable it. - bool ShouldDisplayDiagnosticName; - - PathDiagnosticConsumerOptions() = delete; + bool ShouldDisplayDiagnosticName = false; }; class PathDiagnosticConsumer {