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

Anton Yartsev via cfe-commits cfe-commits at lists.llvm.org
Wed Aug 31 15:32:22 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:
> ayartsev wrote:
> > 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?
> I think mentioning the option is the best option. What is that option called in scan-build?
scan-build (both perl and python versions) has two options: "-plist" and "-plist-html" that are translated to "-analyzer-output=plist" and "-analyzer-output=plist-html" frontend options respectively.


https://reviews.llvm.org/D22494





More information about the cfe-commits mailing list