[PATCH] D12119: Analyzer: Fix a crasher in UbigraphViz

Ted Kremenek via cfe-commits cfe-commits at lists.llvm.org
Fri Aug 21 22:09:43 PDT 2015


krememek added inline comments.

================
Comment at: lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp:778
@@ -780,3 +777,3 @@
 
-UbigraphViz::UbigraphViz(std::unique_ptr<raw_ostream> Out, StringRef Filename)
-    : Out(std::move(Out)), Filename(Filename), Cntr(0) {
+UbigraphViz::UbigraphViz(std::unique_ptr<raw_ostream> Stm, StringRef Filename)
+    : Out(std::move(Stm)), Filename(Filename), Cntr(0) {
----------------
While succinct, I think 'Stm' is an actively harmful name as it conveys no meaning.  There's no need to hyper optimize here.

How about 'outStream', or something that clearly indicates what it is.

You're only going to use it twice.  No harm in spelling it out.  'Stm' could mean a bunch of things.


http://reviews.llvm.org/D12119





More information about the cfe-commits mailing list