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

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: 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-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..821fae71d0d0b6e0bc0e6db4a62854bb3c33ed6c 100644
--- a/tools/clang/rewrite_to_chrome_style/tests/methods-original.cc
+++ b/tools/clang/rewrite_to_chrome_style/tests/methods-original.cc
@@ -181,13 +181,18 @@ class BitVector {
class OutOfLineBits {};
enum Foo { Blah };
struct Bar {};
+ class Baz {};
+
+ 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>(); }
danakj 2016/09/08 23:30:40 does it work for "const MyRefPtr<Baz>&" also? add
Łukasz Anforowicz 2016/09/09 00:20:35 It works. I've added a test.
private:
Bar m_bar;

Powered by Google App Engine
This is Rietveld 408576698