Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / Modules / Inputs / cxx-decls-imported.h
blob0a172150fc145c5c06bb99ff6fb7be4959adf627
1 class HasFriends {
2 friend void friend_1(HasFriends);
3 friend void friend_2(HasFriends);
4 void private_thing();
5 };
7 struct HasNontrivialDefaultConstructor {
8 HasNontrivialDefaultConstructor() = default;
9 HasNontrivialDefaultConstructor(int n = 0);
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;
15 private:
16 int n;
19 static_assert(!__is_trivial(HasNontrivialDefaultConstructor), "");
20 static_assert(!__has_trivial_constructor(HasNontrivialDefaultConstructor), "");
22 void *operator new[](__SIZE_TYPE__);
24 extern int mergeUsedFlag;
25 inline int getMergeUsedFlag() { return mergeUsedFlag; }
27 typedef struct {
28 int n;
29 int m;
30 } NameForLinkage;
32 struct HasVirtualFunctions {
33 virtual void f();
35 struct OverridesVirtualFunctions : HasVirtualFunctions {
36 void f();
38 extern "C" void ExternCFunction();
40 typedef struct {
41 struct Inner {
42 int n;
44 } NameForLinkage2;
45 auto name_for_linkage2_inner_a = NameForLinkage2::Inner();
46 typedef decltype(name_for_linkage2_inner_a) NameForLinkage2Inner;
48 namespace Aliased { extern int a; }
49 namespace Alias = Aliased;
51 struct InhCtorA { InhCtorA(int); };
52 struct InhCtorB : InhCtorA { using InhCtorA::InhCtorA; };
54 struct ClassWithVBases : HasFriends, virtual HasNontrivialDefaultConstructor {
55 int n;
57 struct ClassWithVBases;