[clang] Implement lifetime analysis for lifetime_capture_by(X) (#115921)
[llvm-project.git] / clang / test / Modules / Inputs / templates-right.h
blobbb3f7c30182a10f019e505c90c50a356fdeceee9
1 @import templates_top;
3 template<typename T> class Vector {
4 public:
5 void push_back(const T&);
6 };
8 template<typename T> class List;
9 template<> class List<bool> {
10 public:
11 void push_back(int);
14 namespace N {
15 template<typename T> class Set {
16 public:
17 void insert(T);
21 constexpr unsigned List<int>::*size_right = &List<int>::size;
22 List<int> list_right = { 0, 12 };
23 typedef List<int> ListInt_right;
25 template <typename T>
26 void pendingInstantiationEmit(T) {}
27 void triggerPendingInstantiationToo() {
28 pendingInstantiationEmit(12);
31 void redeclDefinitionEmit(){}
33 typedef Outer<int>::Inner OuterIntInner_right;
35 int defineListDoubleRight() {
36 List<double> ld;
37 ld.push_back(0.0);
38 return ld.size;
41 inline void defineListLongRight() {
42 List<long> ll;
45 template<typename T> struct MergePatternDecl;
47 void outOfLineInlineUseRightF(void (OutOfLineInline<int>::*)() = &OutOfLineInline<int>::f);
48 void outOfLineInlineUseRightG(void (OutOfLineInline<int>::*)() = &OutOfLineInline<int>::g);
49 void outOfLineInlineUseRightH(void (OutOfLineInline<int>::*)() = &OutOfLineInline<int>::h);
51 inline int *getStaticDataMemberRight() {
52 return WithUndefinedStaticDataMember<int[]>::undefined;
55 inline WithAttributes<int> make_with_attributes_right() { return WithAttributes<int>(); }