From 2733ad2c244ab33553bbd1aaca4c76907fdd0760 Mon Sep 17 00:00:00 2001 From: Haojian Wu Date: Tue, 11 Feb 2020 10:05:52 +0100 Subject: [PATCH] [clang-rename] Fix the failure rename test. We cannot run two different tests in a single lit test, split into two. --- clang/test/clang-rename/Ctor.cpp | 13 ------------- clang/test/clang-rename/TemplateCtor.cpp | 10 ++++++++++ 2 files changed, 10 insertions(+), 13 deletions(-) create mode 100644 clang/test/clang-rename/TemplateCtor.cpp diff --git a/clang/test/clang-rename/Ctor.cpp b/clang/test/clang-rename/Ctor.cpp index 1213cc6..9908a41 100644 --- a/clang/test/clang-rename/Ctor.cpp +++ b/clang/test/clang-rename/Ctor.cpp @@ -5,23 +5,10 @@ public: Foo::Foo() /* Test 2 */ {} // CHECK: Bar::Bar() /* Test 2 */ {} - -class Foo2 { /* Test 3 */ // CHECK: class Bar2 { -public: - template - Foo2(); // CHECK: Bar2(); - - template - Foo2(Foo2 &); // CHECK: Bar2(Bar2 &); -}; - - // Test 1. // RUN: clang-rename -offset=62 -new-name=Bar %s -- | sed 's,//.*,,' | FileCheck %s // Test 2. // RUN: clang-rename -offset=116 -new-name=Bar %s -- | sed 's,//.*,,' | FileCheck %s -// Test 3. -// RUN: clang-rename -offset=187 -new-name=Bar2 %s -- | sed 's,//.*,,' | FileCheck %s // To find offsets after modifying the file, use: // grep -Ubo 'Foo.*' diff --git a/clang/test/clang-rename/TemplateCtor.cpp b/clang/test/clang-rename/TemplateCtor.cpp new file mode 100644 index 0000000..9a59194 --- /dev/null +++ b/clang/test/clang-rename/TemplateCtor.cpp @@ -0,0 +1,10 @@ +class Foo { // CHECK: class Bar { +public: + template + Foo(); // CHECK: Bar(); + + template + Foo(Foo &); // CHECK: Bar(Bar &); +}; + +// RUN: clang-rename -offset=6 -new-name=Bar %s -- | sed 's,//.*,,' | FileCheck %s -- 2.7.4