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

Unified Diff: tools/clang/rewrite_to_chrome_style/tests/template-original.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-original.cc
diff --git a/tools/clang/rewrite_to_chrome_style/tests/template-original.cc b/tools/clang/rewrite_to_chrome_style/tests/template-original.cc
index b97e8ea2973f87cdfadb5099097b2acab966d0d6..3d894b6a8ebe0a3a25d1fbe633aa0fb8aeb7f52f 100644
--- a/tools/clang/rewrite_to_chrome_style/tests/template-original.cc
+++ b/tools/clang/rewrite_to_chrome_style/tests/template-original.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); }
+};
+
} // 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