Ted Kremenek | 68957a9 | 2010-08-04 20:01:07 +0000 | [diff] [blame] | 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). | ||||
5 | const int& g() { | ||||
6 | int s; | ||||
7 | return s; // expected-warning{{reference to stack memory associated with local variable 's' returned}} | ||||
8 | } |