blob: 4c7ee942bd527b4633a0c8ef3f1a00f596bf0ba2 [file] [log] [blame]
Douglas Gregore14654b2010-01-29 19:42:41 +00001// RUN: %clang_cc1 -fsyntax-only -verify %s
2
3namespace PR5909 {
4 struct Foo {
5 int x : 20;
6 };
7
8 bool Test(const int& foo);
9
10 const Foo f = { 0 }; // It compiles without the 'const'.
11 bool z = Test(f.x);
12}
Douglas Gregor692f85c2010-02-26 01:17:27 +000013
14namespace PR6264 {
15 typedef int (&T)[3];
16 struct S
17 {
18 operator T ();
19 };
20 void f()
21 {
22 T bar = S();
23 }
24}