Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(475)

Side by Side Diff: tools/clang/rewrite_to_chrome_style/tests/template-original.cc

Issue 2274653002: Handling of UnresolvedUsingValueDecl nodes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@blink-style-new-clang
Patch Set: Removing IsCallee + tweaking a comment. Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « tools/clang/rewrite_to_chrome_style/tests/template-expected.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 m_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::m_size;
136 void method() { m_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
155 template <typename T> 174 template <typename T>
156 void Class<T>::f(int dataSize){}; 175 void Class<T>::f(int dataSize){};
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
OLDNEW
« no previous file with comments | « tools/clang/rewrite_to_chrome_style/tests/template-expected.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698