zaks.anna 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 "
----------------
ayartsev wrote:
> ayartsev wrote:
> > 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.
> I suggest to document the "--analyzer-output" option and to mention this 
> option in the warning.
That sounds good to me.


https://reviews.llvm.org/D22494



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to