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

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

Issue 2589923002: Add a hardcoded list of methods that need a "Get" prefix. (Closed)
Patch Set: Remove commented-out lines. 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 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 }; 165 };
166 166
167 class BitVector { 167 class BitVector {
168 public: 168 public:
169 class OutOfLineBits {}; 169 class OutOfLineBits {};
170 enum Foo { kBlah }; 170 enum Foo { kBlah };
171 struct Bar {}; 171 struct Bar {};
172 class Baz {}; 172 class Baz {};
173 class FooBar {}; 173 class FooBar {};
174 174
175 // Should be renamed to GetReadyState, because of
176 // IsMethodNameLikelyToConflictWithTypeName heuristic.
177 int GetReadyState() { return 123; }
178
175 template <typename T> 179 template <typename T>
176 class MyRefPtr {}; 180 class MyRefPtr {};
177 181
178 // Naive renaming will break the build, by leaving return type the same 182 // Naive renaming will break the build, by leaving return type the same
179 // as the method name - to avoid this "Get" prefix needs to be prepended 183 // as the method name - to avoid this "Get" prefix needs to be prepended
180 // as suggested in https://crbug.com/582312#c17. 184 // as suggested in https://crbug.com/582312#c17.
181 const OutOfLineBits* GetOutOfLineBits() const { return nullptr; } 185 const OutOfLineBits* GetOutOfLineBits() const { return nullptr; }
182 Foo GetFoo() { return kBlah; } 186 Foo GetFoo() { return kBlah; }
183 const Bar& GetBar() const { return bar_; } 187 const Bar& GetBar() const { return bar_; }
184 MyRefPtr<Baz> GetBaz() { return MyRefPtr<Baz>(); } 188 MyRefPtr<Baz> GetBaz() { return MyRefPtr<Baz>(); }
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
254 static void Method(); 258 static void Method();
255 }; 259 };
256 260
257 } // namespace internal 261 } // namespace internal
258 262
259 } // namespace blink 263 } // namespace blink
260 264
261 // https://crbug.com/640688 - need to rewrite method name below. 265 // https://crbug.com/640688 - need to rewrite method name below.
262 void blink::ClassDeclaredInsideBlink::MethodDefinedOutsideBlink() {} 266 void blink::ClassDeclaredInsideBlink::MethodDefinedOutsideBlink() {}
263 void blink::internal::InternalClass::Method() {} 267 void blink::internal::InternalClass::Method() {}
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698