summaryrefslogtreecommitdiffstats
path: root/test/CXX/dcl.decl/dcl.init/dcl.init.ref/p5.cpp
blob: 4c7ee942bd527b4633a0c8ef3f1a00f596bf0ba2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
// RUN: %clang_cc1 -fsyntax-only -verify %s

namespace PR5909 {
  struct Foo {
    int x : 20;
  };
  
  bool Test(const int& foo);
  
  const Foo f = { 0 };  // It compiles without the 'const'.
  bool z = Test(f.x);
}

namespace PR6264 {
  typedef int (&T)[3];
  struct S
  {
    operator T ();
  };
  void f()
  {
    T bar = S();
  }
}
OpenPOWER on IntegriCloud