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

Unified Diff: tools/clang/rewrite_to_chrome_style/tests/methods-original.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
« no previous file with comments | « tools/clang/rewrite_to_chrome_style/tests/methods-expected.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/clang/rewrite_to_chrome_style/tests/methods-original.cc
diff --git a/tools/clang/rewrite_to_chrome_style/tests/methods-original.cc b/tools/clang/rewrite_to_chrome_style/tests/methods-original.cc
index 734d7593761f234fead4c2801fb5791de7498b3b..bc9255bfaa296e37073972a00624430322fd0900 100644
--- a/tools/clang/rewrite_to_chrome_style/tests/methods-original.cc
+++ b/tools/clang/rewrite_to_chrome_style/tests/methods-original.cc
@@ -181,16 +181,24 @@ class BitVector {
class OutOfLineBits {};
enum Foo { Blah };
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* outOfLineBits() const { return nullptr; }
Foo foo() { return Blah; }
const Bar& bar() const { return m_bar; }
+ MyRefPtr<Baz> baz() { return MyRefPtr<Baz>(); }
+ const MyRefPtr<FooBar>& fooBar() { return foobar_; }
private:
Bar m_bar;
+ MyRefPtr<FooBar> foobar_;
};
} // namespace blink
« no previous file with comments | « tools/clang/rewrite_to_chrome_style/tests/methods-expected.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698