diff options
Diffstat (limited to 'test/Analysis/PR7218.c')
-rw-r--r-- | test/Analysis/PR7218.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/Analysis/PR7218.c b/test/Analysis/PR7218.c new file mode 100644 index 0000000..635e56f --- /dev/null +++ b/test/Analysis/PR7218.c @@ -0,0 +1,6 @@ +// RUN: %clang_cc1 -analyze -analyzer-check-objc-mem -analyzer-store region -verify %s +char PR7218(char a) { + char buf[2]; + buf[0] = a; + return buf[1]; // expected-warning {{Undefined or garbage value returned to caller}} +} |