commit | 9e6b37a9f1d499e7ca0950edacd0b6569e491d7f | [log] [tgz] |
---|---|---|
author | Chris Lattner <sabre@nondot.org> | Fri Oct 30 04:01:58 2009 +0000 |
committer | Chris Lattner <sabre@nondot.org> | Fri Oct 30 04:01:58 2009 +0000 |
tree | d6a612a64b3babfad7ea18d4544379543b775dd9 | |
parent | d3379292f90e1381d3236c68891bb725b02464b6 [diff] [blame] |
warn about returning the address of a label. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85576 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/Sema/statements.c b/test/Sema/statements.c index 9a71a40..8eac052 100644 --- a/test/Sema/statements.c +++ b/test/Sema/statements.c
@@ -27,3 +27,9 @@ void test9(const void *P) { __builtin_prefetch(P); } + + +void *test10() { +bar: + return &&bar; // expected-warning {{returning address of label, which is local}} +}