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

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

Issue 2589923002: Add a hardcoded list of methods that need a "Get" prefix. (Closed)
Patch Set: 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 #include "gen/thing.h" 5 #include "gen/thing.h"
6 6
7 namespace v8 { 7 namespace v8 {
8 8
9 class InterfaceOutsideOfBlink { 9 class InterfaceOutsideOfBlink {
10 public: 10 public:
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 }; 169 };
170 170
171 class BitVector { 171 class BitVector {
172 public: 172 public:
173 class OutOfLineBits {}; 173 class OutOfLineBits {};
174 enum Foo { Blah }; 174 enum Foo { Blah };
175 struct Bar {}; 175 struct Bar {};
176 class Baz {}; 176 class Baz {};
177 class FooBar {}; 177 class FooBar {};
178 178
179 // Should be renamed to GetReadyState, because of
180 // IsMethodNameLikelyToConflictWithTypeName heuristic.
181 int readyState() { return 123; }
182
179 template <typename T> 183 template <typename T>
180 class MyRefPtr {}; 184 class MyRefPtr {};
181 185
182 // Naive renaming will break the build, by leaving return type the same 186 // Naive renaming will break the build, by leaving return type the same
183 // as the method name - to avoid this "Get" prefix needs to be prepended 187 // as the method name - to avoid this "Get" prefix needs to be prepended
184 // as suggested in https://crbug.com/582312#c17. 188 // as suggested in https://crbug.com/582312#c17.
185 const OutOfLineBits* outOfLineBits() const { return nullptr; } 189 const OutOfLineBits* outOfLineBits() const { return nullptr; }
186 Foo foo() { return Blah; } 190 Foo foo() { return Blah; }
187 const Bar& bar() const { return m_bar; } 191 const Bar& bar() const { return m_bar; }
188 MyRefPtr<Baz> baz() { return MyRefPtr<Baz>(); } 192 MyRefPtr<Baz> baz() { return MyRefPtr<Baz>(); }
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
258 static void method(); 262 static void method();
259 }; 263 };
260 264
261 } // namespace internal 265 } // namespace internal
262 266
263 } // namespace blink 267 } // namespace blink
264 268
265 // https://crbug.com/640688 - need to rewrite method name below. 269 // https://crbug.com/640688 - need to rewrite method name below.
266 void blink::ClassDeclaredInsideBlink::methodDefinedOutsideBlink() {} 270 void blink::ClassDeclaredInsideBlink::methodDefinedOutsideBlink() {}
267 void blink::internal::InternalClass::method() {} 271 void blink::internal::InternalClass::method() {}
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698