blob: 593ba1df94d34d854d378853f96088cd4b7778af [file] [log] [blame]
Ted Kremenek68957a92010-08-04 20:01:07 +00001// 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}