llvm-project/clang/test/Analysis/ubigraph-viz.cpp
Ismail Pazarbasi d347e7a920 Analyzer: Fix a crasher in UbigraphViz
Summary:
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.

Reviewers: zaks.anna, krememek

Subscribers: cfe-commits

Differential Revision: http://reviews.llvm.org/D12119

llvm-svn: 248050
2015-09-18 21:54:47 +00:00

8 lines
172 B
C++

// 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;
}