|
1 | 1 | template <class T, int... Args> struct C {
|
2 | 2 | T member;
|
3 |
| - bool isSixteenThirtyTwo() { return false; } |
| 3 | + bool argsAre_16_32() { return false; } |
4 | 4 | };
|
5 | 5 |
|
6 | 6 | template <> struct C<int, 16> {
|
7 | 7 | int member;
|
8 |
| - bool isSixteenThirtyTwo() { return false; } |
| 8 | + bool argsAre_16_32() { return false; } |
9 | 9 | };
|
10 | 10 |
|
11 | 11 | template <> struct C<int, 16, 32> : C<int, 16> {
|
12 |
| - bool isSixteenThirtyTwo() { return true; } |
| 12 | + bool argsAre_16_32() { return true; } |
13 | 13 | };
|
14 | 14 |
|
15 | 15 | template <class T, typename... Args> struct D {
|
16 | 16 | T member;
|
17 |
| - bool isIntBool() { return false; } |
| 17 | + bool argsAre_Int_bool() { return false; } |
18 | 18 | };
|
19 | 19 |
|
20 | 20 | template <> struct D<int, int> {
|
21 | 21 | int member;
|
22 |
| - bool isIntBool() { return false; } |
| 22 | + bool argsAre_Int_bool() { return false; } |
23 | 23 | };
|
24 | 24 |
|
25 | 25 | template <> struct D<int, int, bool> : D<int, int> {
|
26 |
| - bool isIntBool() { return true; } |
| 26 | + bool argsAre_Int_bool() { return true; } |
27 | 27 | };
|
28 | 28 |
|
29 |
| -template<int Size> struct array { |
30 |
| - int Arr[Size]; |
31 |
| - array() {} |
32 |
| -}; |
33 |
| - |
34 |
| -int main (int argc, char const *argv[]) |
35 |
| -{ |
36 |
| - C<int,16,32> myC; |
37 |
| - C<int,16> myLesserC; |
38 |
| - myC.member = 64; |
39 |
| - (void)C<int,16,32>().isSixteenThirtyTwo(); |
40 |
| - (void)C<int,16>().isSixteenThirtyTwo(); |
41 |
| - (void)(myC.member != 64); //% self.expect("expression -- myC", DATA_TYPES_DISPLAYED_CORRECTLY, substrs = ["64"]) |
42 |
| - //% self.expect("expression -- myLesserC.isSixteenThirtyTwo()", DATA_TYPES_DISPLAYED_CORRECTLY, substrs = ["false"]) |
43 |
| - //% self.expect("expression -- myC.isSixteenThirtyTwo()", DATA_TYPES_DISPLAYED_CORRECTLY, substrs = ["true"]) |
44 |
| - |
45 |
| - // Disabling until we do template lookup correctly: http://lists.llvm.org/pipermail/lldb-commits/Week-of-Mon-20180507/040689.html |
46 |
| - //#% self.expect("expression -- C<int, 16>().isSixteenThirtyTwo()", DATA_TYPES_DISPLAYED_CORRECTLY, substrs = ["false"]) |
47 |
| - //#% self.expect("expression -- C<int, 16, 32>().isSixteenThirtyTwo()", DATA_TYPES_DISPLAYED_CORRECTLY, substrs = ["true"]) |
48 |
| - |
49 |
| - D<int,int,bool> myD; |
50 |
| - D<int,int> myLesserD; |
51 |
| - myD.member = 64; |
52 |
| - (void)D<int,int,bool>().isIntBool(); |
53 |
| - (void)D<int,int>().isIntBool(); //% self.expect("expression -- myD", DATA_TYPES_DISPLAYED_CORRECTLY, substrs = ["64"]) |
54 |
| - //% self.expect("expression -- myLesserD.isIntBool()", DATA_TYPES_DISPLAYED_CORRECTLY, substrs = ["false"]) |
55 |
| - //% self.expect("expression -- myD.isIntBool()", DATA_TYPES_DISPLAYED_CORRECTLY, substrs = ["true"]) |
56 |
| - |
57 |
| - // See comment above. |
58 |
| - //#% self.expect("expression -- D<int, int>().isIntBool()", DATA_TYPES_DISPLAYED_CORRECTLY, substrs = ["false"]) |
59 |
| - //#% self.expect("expression -- D<int, int, bool>().isIntBool()", DATA_TYPES_DISPLAYED_CORRECTLY, substrs = ["true"]) |
60 |
| - |
61 |
| - array<3> myArray; //% self.expect("expression -- myArray", DATA_TYPES_DISPLAYED_CORRECTLY, substrs = ["Arr"]) |
62 |
| - |
63 |
| - return 1; |
| 29 | +int main(int argc, char const *argv[]) { |
| 30 | + C<int, 16, 32> myC; |
| 31 | + C<int, 16> myLesserC; |
| 32 | + myC.member = 64; |
| 33 | + (void)C<int, 16, 32>().argsAre_16_32(); |
| 34 | + (void)C<int, 16>().argsAre_16_32(); |
| 35 | + (void)(myC.member != 64); |
| 36 | + D<int, int, bool> myD; |
| 37 | + D<int, int> myLesserD; |
| 38 | + myD.member = 64; |
| 39 | + (void)D<int, int, bool>().argsAre_Int_bool(); |
| 40 | + (void)D<int, int>().argsAre_Int_bool(); |
| 41 | + |
| 42 | + return 0; // break here |
64 | 43 | }
|
0 commit comments