// RUN: %clang_cc1 -fsyntax-only -std=c++0x -verify %s

namespace PR10622 {
  struct foo {
    const int first;
    foo(const foo&) = default;
  };
  void find_or_insert(const foo& __obj) {
    foo x(__obj);
  }
}

// RUN: %clang_cc1 -fsyntax-only -std=c++0x -verify %s

namespace PR10622 {
  struct foo {
    const int first;
    foo(const foo&) = default;
  };
  void find_or_insert(const foo& __obj) {
    foo x(__obj);
  }

  struct bar : foo {
    bar(const bar&) = default;
  };
  void test_bar(const bar &obj) {
    bar obj2(obj);
  }
}

Expand test of C++0x [class.copymove]p15 to make sure we're actually calling the copy constructor of a base/member from an explicitly-defaulted copy constructor, rather than the default constructor
Expand test of C++0x [class.copymove]p15 to make sure we're actually calling the copy constructor of a base/member from an explicitly-defaulted copy constructor, rather than the default constructor

git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@137220 91177308-0d34-0410-b5e6-96231b3b80d8
