This revision was automatically updated to reflect the committed changes.
Closed by commit rL248050: Analyzer: Fix a crasher in UbigraphViz (authored by 
ismailp).

Changed prior to commit:
  http://reviews.llvm.org/D12119?vs=35141&id=35142#toc

Repository:
  rL LLVM

http://reviews.llvm.org/D12119

Files:
  cfe/trunk/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp
  cfe/trunk/test/Analysis/ubigraph-viz.cpp

Index: cfe/trunk/test/Analysis/ubigraph-viz.cpp
===================================================================
--- cfe/trunk/test/Analysis/ubigraph-viz.cpp
+++ cfe/trunk/test/Analysis/ubigraph-viz.cpp
@@ -0,0 +1,7 @@
+// RUN: %clang_cc1 -analyze -analyzer-checker=core,unix.API 
-analyzer-viz-egraph-ubigraph -verify %s
+// expected-no-diagnostics
+
+int f(int x) {
+  return x < 0 ? 0 : 42;
+}
+
Index: cfe/trunk/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp
===================================================================
--- cfe/trunk/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp
+++ cfe/trunk/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp
@@ -778,8 +778,9 @@
        << ", ('arrow','true'), ('oriented', 'true'))\n";
 }
 
-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> OutStream,
+                         StringRef Filename)
+    : Out(std::move(OutStream)), Filename(Filename), Cntr(0) {
 
   *Out << "('vertex_style_attribute', 0, ('shape', 'icosahedron'))\n";
   *Out << "('vertex_style', 1, 0, ('shape', 'sphere'), ('color', '#ffcc66'),"


Index: cfe/trunk/test/Analysis/ubigraph-viz.cpp
===================================================================
--- cfe/trunk/test/Analysis/ubigraph-viz.cpp
+++ cfe/trunk/test/Analysis/ubigraph-viz.cpp
@@ -0,0 +1,7 @@
+// RUN: %clang_cc1 -analyze -analyzer-checker=core,unix.API -analyzer-viz-egraph-ubigraph -verify %s
+// expected-no-diagnostics
+
+int f(int x) {
+  return x < 0 ? 0 : 42;
+}
+
Index: cfe/trunk/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp
===================================================================
--- cfe/trunk/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp
+++ cfe/trunk/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp
@@ -778,8 +778,9 @@
        << ", ('arrow','true'), ('oriented', 'true'))\n";
 }
 
-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> OutStream,
+                         StringRef Filename)
+    : Out(std::move(OutStream)), Filename(Filename), Cntr(0) {
 
   *Out << "('vertex_style_attribute', 0, ('shape', 'icosahedron'))\n";
   *Out << "('vertex_style', 1, 0, ('shape', 'sphere'), ('color', '#ffcc66'),"
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to