stack-addr-ps.cpp revision d976ca4fcacdd965446bcfbe8cb03b4ee67cd827
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