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

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

Issue 2256913002: Handling of DependentScopeDeclRefExpr and CXXDependentScopeMemberExpr nodes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@blink-style-new-clang
Patch Set: Created 4 years, 4 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/template-expected.cc
diff --git a/tools/clang/rewrite_to_chrome_style/tests/template-expected.cc b/tools/clang/rewrite_to_chrome_style/tests/template-expected.cc
index c481a68ed4b16e30fdbf573f6dd7cfa1f3291a2c..48a60ff61174b5851506dc5111758b38819d39ae 100644
--- a/tools/clang/rewrite_to_chrome_style/tests/template-expected.cc
+++ b/tools/clang/rewrite_to_chrome_style/tests/template-expected.cc
@@ -18,6 +18,17 @@ class Class {
template <typename T>
void functionTemplate(T x) {}
+template <typename T = Class>
+void functionTemplate2() {
+ T::staticMethodTemplate(123);
+}
+
+template <typename T = Class>
+class TemplatedClass {
+ public:
+ void anotherMethod() { T::staticMethodTemplate(123); }
+};
+
Łukasz Anforowicz 2016/08/17 22:45:09 Test that DependentScopeDeclRefExpr and CXXDepende
} // not_blink
namespace blink {
@@ -140,4 +151,28 @@ struct Class2 {
} // namespace test_template_arg_is_method_template_in_member_context
+namespace test_new_array_bug {
+
+class PartitionAllocator {
+ public:
+ static void Method() {}
+};
+
+template <typename Allocator = PartitionAllocator>
+class Vector {
+ public:
+ // https://crbug.com/584117: |method| below should be renamed to |Method|.
+ // |Allocator::method| is a CXXDependentScopeMemberExpr.
+ void AnotherMethod() { Allocator::Method(); }
+};
+
+template <typename Allocator = PartitionAllocator>
+void Test() {
+ // https://crbug.com/584117: |method| below should be renamed to |Method|.
+ // |Allocator::method| is a DependentScopeDeclRefExpr.
+ Allocator::Method();
+}
+
+} // namespace test_new_array_bug
+
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698