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

Unified Diff: tools/clang/rewrite_to_chrome_style/tests/functions-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/functions-original.cc
diff --git a/tools/clang/rewrite_to_chrome_style/tests/functions-original.cc b/tools/clang/rewrite_to_chrome_style/tests/functions-original.cc
index eb5e0ecbde75ffaf699e7275f6747895ebff304e..b417725548bbb1447ef679cb5d84f40e7f5a8d69 100644
--- a/tools/clang/rewrite_to_chrome_style/tests/functions-original.cc
+++ b/tools/clang/rewrite_to_chrome_style/tests/functions-original.cc
@@ -4,6 +4,18 @@
namespace blink {
+namespace {
+
+// Naive renaming will break the build, by leaving return type the same name as
+// the function name - to avoid this "Get" prefix needs to be prepended as
+// suggested in https://crbug.com/582312#c17.
+class Foo582312 {};
+using Bar = Foo582312;
+static Bar* bar() {
+ return nullptr;
+}
+}
danakj 2016/09/08 23:30:40 nit: whitespace above and // namespace
Łukasz Anforowicz 2016/09/09 00:20:35 Done.
+
// Tests that the prototype for a function is updated.
int testFunctionThatTakesTwoInts(int x, int y);
// Overload to test using declarations that introduce multiple shadow

Powered by Google App Engine
This is Rietveld 408576698