[PATCH] D22494: [analyzer] Explain why analyzer report is not generated (fix for PR12421).

Anton Yartsev via cfe-commits cfe-commits at lists.llvm.org
Fri Aug 5 04:46:35 PDT 2016

ayartsev added inline comments.

Comment at: lib/StaticAnalyzer/Core/PathDiagnostic.cpp:216
@@ +215,3 @@
+    llvm::raw_svector_ostream warning(buf);
+    warning << "warning: Path diagnostic report is not generated. Current "
+            << "output format does not support diagnostics that cross file "
zaks.anna wrote:
> Can/should we be specific about what the user-specified output format is?
It's unable to extract information about user-specified output format from the "PathDiagnosticConsumer" interface. And this class seem to be too generic to contain "AnalyzerOptions" member or to have e.g. "pure virtual getOutputFormatName()".
So the only way I see to get info about output format is to use "PathDiagnosticConsumer::getName()".
Maybe it makes sense just to add a hint to use "--analyzer-output" driver option to change output format. However this option is not documented at all and is not displayed in clang help. What do you think?


More information about the cfe-commits mailing list