Daniel Dunbar | a572887 | 2009-12-15 20:14:24 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -fsyntax-only %s -verify |
Anders Carlsson | 5385991 | 2009-01-13 17:00:51 +0000 | [diff] [blame] | 2 | |
3 | struct S { | ||||
4 | int one; | ||||
5 | int two; | ||||
6 | }; | ||||
7 | |||||
Douglas Gregor | 5291c3c | 2010-07-13 08:18:22 +0000 | [diff] [blame^] | 8 | struct S const foo(void); // expected-warning{{type qualifier on return type has no effect}} |
9 | |||||
Anders Carlsson | 5385991 | 2009-01-13 17:00:51 +0000 | [diff] [blame] | 10 | |
11 | struct S tmp; | ||||
12 | |||||
13 | void priv_sock_init() { | ||||
14 | tmp = (struct S)foo(); | ||||
15 | } |