OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 namespace not_blink { | 5 namespace not_blink { |
6 | 6 |
7 void function(int x) {} | 7 void function(int x) {} |
8 | 8 |
9 class Class { | 9 class Class { |
10 public: | 10 public: |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
112 | 112 |
113 void Test() { | 113 void Test() { |
114 // f should be rewritten. | 114 // f should be rewritten. |
115 H<int, Class::F>(0); | 115 H<int, Class::F>(0); |
116 // Non-Blink should stay the same. | 116 // Non-Blink should stay the same. |
117 H<int, not_blink::Class::staticMethodTemplate>(1); | 117 H<int, not_blink::Class::staticMethodTemplate>(1); |
118 } | 118 } |
119 | 119 |
120 } // test_template_arg_is_method_template_in_non_member_context | 120 } // test_template_arg_is_method_template_in_non_member_context |
121 | 121 |
| 122 namespace test_inherited_field { |
| 123 |
| 124 template <typename T> |
| 125 class BaseClass { |
| 126 public: |
| 127 unsigned long size_; |
| 128 }; |
| 129 |
| 130 template <typename T> |
| 131 class DerivedClass : protected BaseClass<T> { |
| 132 private: |
| 133 using Base = BaseClass<T>; |
| 134 // https://crbug.com/640016: Need to rewrite |m_size| into |size_|. |
| 135 using Base::size_; |
| 136 void Method() { size_ = 123; } |
| 137 }; |
| 138 |
| 139 } // namespace test_inherited_field |
| 140 |
122 namespace test_template_arg_is_method_template_in_member_context { | 141 namespace test_template_arg_is_method_template_in_member_context { |
123 | 142 |
124 struct Class { | 143 struct Class { |
125 template <typename T> | 144 template <typename T> |
126 static void F(T) {} | 145 static void F(T) {} |
127 }; | 146 }; |
128 | 147 |
129 struct Class2 { | 148 struct Class2 { |
130 template <typename T> | 149 template <typename T> |
131 void F(T x) { | 150 void F(T x) { |
(...skipping 23 matching lines...) Expand all Loading... |
155 template <typename T> | 174 template <typename T> |
156 void Class<T>::F(int data_size){}; | 175 void Class<T>::F(int data_size){}; |
157 | 176 |
158 void Foo() { | 177 void Foo() { |
159 Class<char>().F(123); | 178 Class<char>().F(123); |
160 }; | 179 }; |
161 | 180 |
162 } // namespace test_unnamed_arg | 181 } // namespace test_unnamed_arg |
163 | 182 |
164 } // namespace blink | 183 } // namespace blink |
OLD | NEW |