1class HasFriends {
2  friend void friend_1(HasFriends);
3  friend void friend_2(HasFriends);
4  void private_thing();
5};
6
7struct HasNontrivialDefaultConstructor {
8  HasNontrivialDefaultConstructor() = default;
9  HasNontrivialDefaultConstructor(int n = 0);
10
11  // Ensure this class is not POD but is still trivially-copyable.
12  // This is necessary to exercise the second static_assert below,
13  // because GCC's spec for __has_trivial_constructor is absurd.
14  int m;
15private:
16  int n;
17};
18
19static_assert(!__is_trivial(HasNontrivialDefaultConstructor), "");
20static_assert(!__has_trivial_constructor(HasNontrivialDefaultConstructor), "");
21
22void *operator new[](__SIZE_TYPE__);
23
24extern int mergeUsedFlag;
25inline int getMergeUsedFlag() { return mergeUsedFlag; }
26
27typedef struct {
28  int n;
29  int m;
30} NameForLinkage;
31
32struct HasVirtualFunctions {
33  virtual void f();
34};
35struct OverridesVirtualFunctions : HasVirtualFunctions {
36  void f();
37};
38extern "C" void ExternCFunction();
39
40typedef struct {
41  struct Inner {
42    int n;
43  };
44} NameForLinkage2;
45auto name_for_linkage2_inner_a = NameForLinkage2::Inner();
46typedef decltype(name_for_linkage2_inner_a) NameForLinkage2Inner;
47
48namespace Aliased { extern int a; }
49namespace Alias = Aliased;
50
51struct InhCtorA { InhCtorA(int); };
52struct InhCtorB : InhCtorA { using InhCtorA::InhCtorA; };
53