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

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

Issue 2324643002: Prepending "Get" when type with conflicting name is hidden inside return type. (Closed)
Patch Set: Addressed CR feedback from danakj@. Created 4 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: tools/clang/rewrite_to_chrome_style/tests/methods-expected.cc
diff --git a/tools/clang/rewrite_to_chrome_style/tests/methods-expected.cc b/tools/clang/rewrite_to_chrome_style/tests/methods-expected.cc
index 0b07aef279cb1ead1bfdbce8cd4c8b0a098e0c94..569e446cd2c7c54a200adfafaffef2f733c38844 100644
--- a/tools/clang/rewrite_to_chrome_style/tests/methods-expected.cc
+++ b/tools/clang/rewrite_to_chrome_style/tests/methods-expected.cc
@@ -177,16 +177,24 @@ class BitVector {
class OutOfLineBits {};
enum Foo { kBlah };
struct Bar {};
+ class Baz {};
+ class FooBar {};
+
+ template <typename T>
+ class MyRefPtr {};
// Naive renaming will break the build, by leaving return type the same
- // as method the name - to avoid this "Get" prefix needs to be prepended
+ // as the method name - to avoid this "Get" prefix needs to be prepended
// as suggested in https://crbug.com/582312#c17.
const OutOfLineBits* GetOutOfLineBits() const { return nullptr; }
Foo GetFoo() { return kBlah; }
const Bar& GetBar() const { return bar_; }
+ MyRefPtr<Baz> GetBaz() { return MyRefPtr<Baz>(); }
+ const MyRefPtr<FooBar>& GetFooBar() { return foobar_; }
private:
Bar bar_;
+ MyRefPtr<FooBar> foobar_;
};
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698