[PATCH] D76510: [analyzer] Change the default output type to PD_TEXT_MINIMAL in the frontend, error if an output loc is missing for PathDiagConsumers that need it

Kristóf Umann via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Apr 2 04:51:28 PDT 2020


Szelethus marked an inline comment as done.
Szelethus added a comment.

Lets highlight then that this change affects the analyzer in **frontend** mode, not in the **driver** configuration. I might make a patch for that too, btw.

@NoQ, were you able to check whether **this** change could break anything? :)



================
Comment at: clang/include/clang/StaticAnalyzer/Core/AnalyzerOptions.h:209
   AnalysisConstraints AnalysisConstraintsOpt = RangeConstraintsModel;
-  AnalysisDiagClients AnalysisDiagOpt = PD_HTML;
+  AnalysisDiagClients AnalysisDiagOpt = PD_TEXT_MINIMAL;
   AnalysisPurgeMode AnalysisPurgeOpt = PurgeStmt;
----------------
NoQ wrote:
> This patch most likely changes almost nothing because the default output mode of `clang --analyze` has always been Plist:
> 
> ```lang=c++
> lib/Driver/ToolChains/Clang.cpp
> 2938:  // Set the output format. The default is plist, for (lame) historical reasons.
> 2939-  CmdArgs.push_back("-analyzer-output");
> 2940-  if (Arg *A = Args.getLastArg(options::OPT__analyzer_output))
> 2941-    CmdArgs.push_back(A->getValue());
> 2942-  else
> 2943-    CmdArgs.push_back("plist");
> ```
> I'll double check on historical reasons; i suspect we should be able to transition out of it eventually because this is indeed the worst possible output mode for `--analyze`.
> 
> That said, i wonder how/why do our tests currently work without flooding everything with html reports.
Because the HTML report acts like the text if no output file is supplied.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D76510





More information about the cfe-commits mailing list