Home | History | Annotate | Download | only in dcl.init.ref
      1 // RUN: %clang_cc1 -fsyntax-only -verify %s
      2 // expected-no-diagnostics
      3 
      4 // PR5787
      5 class C {
      6  public:
      7   ~C() {}
      8 };
      9 
     10 template <typename T>
     11 class E {
     12  public:
     13   E& Foo(const C&);
     14   E& Bar() { return Foo(C()); }
     15 };
     16 
     17 void Test() {
     18   E<int> e;
     19   e.Bar();
     20 }
     21