Daniel Dunbar | 8fbe78f | 2009-12-15 20:14:24 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -fsyntax-only %s -verify |
Andy Gibbs | c6e68da | 2012-10-19 12:44:48 +0000 | [diff] [blame] | 2 | // expected-no-diagnostics |
Anders Carlsson | bc12e92 | 2009-01-13 17:00:51 +0000 | [diff] [blame] | 3 | |
4 | struct S { | ||||
5 | int one; | ||||
6 | int two; | ||||
7 | }; | ||||
8 | |||||
Chandler Carruth | cb3b5a4 | 2010-07-14 06:36:18 +0000 | [diff] [blame] | 9 | struct S const foo(void); |
Douglas Gregor | 603d81b | 2010-07-13 08:18:22 +0000 | [diff] [blame] | 10 | |
Anders Carlsson | bc12e92 | 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 | } |