diff options
author | Haojian Wu <hokein@google.com> | 2017-10-25 08:25:25 +0000 |
---|---|---|
committer | Haojian Wu <hokein@google.com> | 2017-10-25 08:25:25 +0000 |
commit | 6ec2b8ac775918c4cdb5e3920a8ac212dcc1097c (patch) | |
tree | 263d552cf3833f0645928f11bf3cc72df020e0a7 /clang/test | |
parent | 238c14b6c7970b1d6f48ef2c5ad35c772f1dee3d (diff) | |
download | bcm5719-llvm-6ec2b8ac775918c4cdb5e3920a8ac212dcc1097c.tar.gz bcm5719-llvm-6ec2b8ac775918c4cdb5e3920a8ac212dcc1097c.zip |
[clang-rename] Fix and enable the failing TemplatedClassFunction test.
Reviewers: ioeric
Reviewed By: ioeric
Subscribers: klimek, cfe-commits
Differential Revision: https://reviews.llvm.org/D39241
llvm-svn: 316561
Diffstat (limited to 'clang/test')
-rw-r--r-- | clang/test/clang-rename/TemplatedClassFunction.cpp | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/clang/test/clang-rename/TemplatedClassFunction.cpp b/clang/test/clang-rename/TemplatedClassFunction.cpp index 1f5b0b52ba7..d7f21e0847c 100644 --- a/clang/test/clang-rename/TemplatedClassFunction.cpp +++ b/clang/test/clang-rename/TemplatedClassFunction.cpp @@ -6,17 +6,22 @@ public: int main(int argc, char **argv) { A<int> a; - a.foo(); /* Test 2 */ // CHECK: a.bar() /* Test 2 */ + A<double> b; + A<float> c; + a.foo(); /* Test 2 */ // CHECK: a.bar(); /* Test 2 */ + b.foo(); /* Test 3 */ // CHECK: b.bar(); /* Test 3 */ + c.foo(); /* Test 4 */ // CHECK: c.bar(); /* Test 4 */ return 0; } // Test 1. -// RUN: clang-refactor rename -offset=48 -new-name=bar %s -- | sed 's,//.*,,' | FileCheck %s +// RUN: clang-rename -offset=48 -new-name=bar %s -- | sed 's,//.*,,' | FileCheck %s // Test 2. -// RUN: clang-refactor rename -offset=162 -new-name=bar %s -- | sed 's,//.*,,' | FileCheck %s -// -// Currently unsupported test. -// XFAIL: * +// RUN: clang-rename -offset=191 -new-name=bar %s -- | sed 's,//.*,,' | FileCheck %s +// Test 3. +// RUN: clang-rename -offset=255 -new-name=bar %s -- | sed 's,//.*,,' | FileCheck %s +// Test 4. +// RUN: clang-rename -offset=319 -new-name=bar %s -- | sed 's,//.*,,' | FileCheck %s // To find offsets after modifying the file, use: // grep -Ubo 'foo.*' <file> |