1 | // RUN: %clang_analyze_cc1 -analyzer-checker=core -analyzer-store region -verify %s |
---|---|
2 | char PR7218(char a) { |
3 | char buf[2]; |
4 | buf[0] = a; |
5 | return buf[1]; // expected-warning {{Undefined or garbage value returned to caller}} |
6 | } |
7 |
1 | // RUN: %clang_analyze_cc1 -analyzer-checker=core -analyzer-store region -verify %s |
---|---|
2 | char PR7218(char a) { |
3 | char buf[2]; |
4 | buf[0] = a; |
5 | return buf[1]; // expected-warning {{Undefined or garbage value returned to caller}} |
6 | } |
7 |