llvm-project/clang/test/Analysis/diagnostics/undef-value-caller.c
Richard Smith 5b2636142a Move test inputs into Inputs directory.
We don't need a new ExpectedOutputs/ convention. Expected outputs are
just another form of test input.

llvm-svn: 339634
2018-08-14 00:18:48 +00:00

14 lines
482 B
C

// RUN: %clang_analyze_cc1 -analyzer-checker=core -analyzer-output=plist -o %t %s
// RUN: tail -n +11 %t | diff -u -w - %S/Inputs/expected-plists/undef-value-caller.c.plist
#include "undef-value-callee.h"
// This code used to cause a crash since we were not adding fileID of the header to the plist diagnostic.
int test_calling_unimportant_callee(int argc, char *argv[]) {
int x;
callee();
return x; // expected-warning {{Undefined or garbage value returned to caller}}
}