stack-addr-ps.cpp revision 68957a919084ab8bbd1f01d534db1d6f31d0f459
1// RUN: %clang_cc1 -fsyntax-only -fblocks -verify %s
2
3// FIXME: Only the stack-address checking in Sema catches this right now, and
4// the stack analyzer doesn't handle the ImplicitCastExpr (lvalue).
5const int& g() {
6  int s;
7  return s; // expected-warning{{reference to stack memory associated with local variable 's' returned}}
8}
9