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

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

Powered by Google App Engine
This is Rietveld 408576698