Daniel Dunbar | a572887 | 2009-12-15 20:14:24 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -fsyntax-only %s -verify |
Andy Gibbs | 8e8fb3b | 2012-10-19 12:44:48 +0000 | [diff] [blame] | 2 | // expected-no-diagnostics |
Anders Carlsson | 5385991 | 2009-01-13 17:00:51 +0000 | [diff] [blame] | 3 | |
4 | struct S { | ||||
5 | int one; | ||||
6 | int two; | ||||
7 | }; | ||||
8 | |||||
Chandler Carruth | 5495f37 | 2010-07-14 06:36:18 +0000 | [diff] [blame] | 9 | struct S const foo(void); |
Douglas Gregor | 5291c3c | 2010-07-13 08:18:22 +0000 | [diff] [blame] | 10 | |
Anders Carlsson | 5385991 | 2009-01-13 17:00:51 +0000 | [diff] [blame] | 11 | |
12 | struct S tmp; | ||||
13 | |||||
14 | void priv_sock_init() { | ||||
15 | tmp = (struct S)foo(); | ||||
16 | } |