ismailp created this revision. ismailp added reviewers: zaks.anna, krememek. ismailp added a subscriber: cfe-commits.
Name `Out` refers to the parameter. It is moved into the member `Out` in ctor-init. Dereferencing null pointer will crash clang, if user passes '-analyzer-viz-egraph-ubigraph' argument. http://reviews.llvm.org/D12119 Files: lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp Index: lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp =================================================================== --- lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp +++ lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp @@ -781,8 +781,8 @@ UbigraphViz::UbigraphViz(std::unique_ptr<raw_ostream> Out, StringRef Filename) : Out(std::move(Out)), Filename(Filename), Cntr(0) { - *Out << "('vertex_style_attribute', 0, ('shape', 'icosahedron'))\n"; - *Out << "('vertex_style', 1, 0, ('shape', 'sphere'), ('color', '#ffcc66')," + *this->Out << "('vertex_style_attribute', 0, ('shape', 'icosahedron'))\n"; + *this->Out << "('vertex_style', 1, 0, ('shape', 'sphere'), ('color', '#ffcc66')," " ('size', '1.5'))\n"; }
Index: lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp =================================================================== --- lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp +++ lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp @@ -781,8 +781,8 @@ UbigraphViz::UbigraphViz(std::unique_ptr<raw_ostream> Out, StringRef Filename) : Out(std::move(Out)), Filename(Filename), Cntr(0) { - *Out << "('vertex_style_attribute', 0, ('shape', 'icosahedron'))\n"; - *Out << "('vertex_style', 1, 0, ('shape', 'sphere'), ('color', '#ffcc66')," + *this->Out << "('vertex_style_attribute', 0, ('shape', 'icosahedron'))\n"; + *this->Out << "('vertex_style', 1, 0, ('shape', 'sphere'), ('color', '#ffcc66')," " ('size', '1.5'))\n"; }
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits