// RUN: %clang_cc1 -fsyntax-only -Wuninitialized -Wconditional-uninitialized -fsyntax-only -fblocks %s -verify
// RUN: %clang_cc1 -fsyntax-only -Wuninitialized -Wconditional-uninitialized -ftrivial-auto-var-init=pattern -fsyntax-only -fblocks %s -verify
typedef size_t;
void *;
int
int
int
int
int
int
int
int
int
int
int
int
void
int
// Simply don't crash on this test case.
void
void
int
// Don't warn in the following example; shows dataflow confluence.
char *;
void
void
int
int ;
int ;
int ;
int
int
int
int
int
// The basic uninitialized value analysis doesn't have enough path-sensitivity
// to catch initializations relying on control-dependencies spanning multiple
// conditionals. This possibly can be handled by making the CFG itself
// represent such control-dependencies, but it is a niche case.
int
float
typedef int MyInt;
MyInt
// Test handling of sizeof().
int
int
void
void
void
int test32_x;
void
void
int
// Test that this case doesn't crash.
void
// Test handling of indirect goto.
void
// Test && nested in ||.
int ;
int ;
int
// Test merging of path-specific dataflow values (without asserting).
int
int
int
int
void
void ;
void
void
int
void
void *
void *
void
int
// FIXME: This is a false positive, but it tests logical operations in switch statements.
int
void
// This CFG caused the uninitialized values warning to inf-loop.
extern int ;
void
// Test that sizeof(VLA) doesn't trigger a warning.
void
// Test absurd case of deadcode + use of blocks. This previously was a false positive
// due to an analysis bug.
int
// This previously triggered an infinite loop in the analysis.
void
// Test uninitialized value used in loop condition.
void
// Test that fixits are not emitted inside macros.
void
// Taking the address is fine
test55 = ; // no-warning
test56 = ; // no-warning
void
void
typedef char jmp_buf;
extern int ; // implicitly returns_twice
void ;
int
int
int
int
int
void ;
void
void