1 // RUN: %clang_analyze_cc1 -analyzer-checker=core,debug.ExprInspection -verify %s
3 void clang_analyzer_eval(int);
5 void callee(void **p
) {
8 // expected-warning@-1 {{Address of stack memory associated with local \
9 variable
'x' is still referred to by the stack variable
'arr' upon \
10 returning to the caller
}}
15 for (int i
= 0; i
< 2; ++i
)
17 // FIXME: Should be UNKNOWN.
18 clang_analyzer_eval(arr
[0] == arr
[1]); // expected-warning{{FALSE}}
21 void loopWithCall(void) {
23 for (int i
= 0; i
< 2; ++i
) {
27 // FIXME: Should be UNKNOWN.
28 clang_analyzer_eval(arr
[0] == arr
[1]); // expected-warning{{TRUE}}