| 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 a7f42051912159954aa9badeaa837a09954e55a9..96dad111ebd778de3e7b80235b48fbd8b03418a9 100644
|
| --- a/tools/clang/rewrite_to_chrome_style/tests/template-expected.cc
|
| +++ b/tools/clang/rewrite_to_chrome_style/tests/template-expected.cc
|
| @@ -2,6 +2,8 @@
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| +#include <type_traits>
|
| +
|
| namespace not_blink {
|
|
|
| void function(int x) {}
|
| @@ -18,6 +20,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 {
|
| @@ -180,4 +193,32 @@ void Foo() {
|
|
|
| } // namespace test_unnamed_arg
|
|
|
| +namespace test_new_array_bug {
|
| +
|
| +class PartitionAllocator {
|
| + public:
|
| + static void Method() {}
|
| +};
|
| +
|
| +template <typename Allocator = PartitionAllocator>
|
| +class Vector {
|
| + public:
|
| + // https://crbug.com/582315: |Allocator::method| is a
|
| + // CXXDependentScopeMemberExpr.
|
| + void AnotherMethod() {
|
| + if (std::is_class<Allocator>::value) // Shouldn't rename |value|
|
| + Allocator::Method(); // Should rename |method| -> |Method|.
|
| + }
|
| +};
|
| +
|
| +template <typename Allocator = PartitionAllocator>
|
| +void Test() {
|
| + // https://crbug.com/582315: |Allocator::method| is a
|
| + // DependentScopeDeclRefExpr.
|
| + if (std::is_class<Allocator>::value) // Shouldn't rename |value|.
|
| + Allocator::Method(); // Should rename |method|.
|
| +}
|
| +
|
| +} // namespace test_new_array_bug
|
| +
|
| } // namespace blink
|
|
|