diff options
| author | Haojian Wu <hokein@google.com> | 2016-10-12 15:50:30 +0000 |
|---|---|---|
| committer | Haojian Wu <hokein@google.com> | 2016-10-12 15:50:30 +0000 |
| commit | db72657774adfca2dc42354f2416a6fdb684e98d (patch) | |
| tree | 3c612ad3d34f092e5592c8f4ff4c1e4523f0d8b4 /clang-tools-extra/test/clang-move/move-class.cpp | |
| parent | 84ebbdaf403fa5fb2ab13e9c247c0653617ecfe4 (diff) | |
| download | bcm5719-llvm-db72657774adfca2dc42354f2416a6fdb684e98d.tar.gz bcm5719-llvm-db72657774adfca2dc42354f2416a6fdb684e98d.zip | |
[clang-move] Compare with real paths of symlinks
Summary: MakeAbsolutePath does wrong things with symlinks previously. When comparing with a symlink, we need to compare with the real path of it. This fixes issues when the build directory is a symlink.
Reviewers: ioeric
Subscribers: beanz, mgorny, cfe-commits, bkramer
Differential Revision: https://reviews.llvm.org/D25508
llvm-svn: 284020
Diffstat (limited to 'clang-tools-extra/test/clang-move/move-class.cpp')
| -rw-r--r-- | clang-tools-extra/test/clang-move/move-class.cpp | 26 |
1 files changed, 15 insertions, 11 deletions
diff --git a/clang-tools-extra/test/clang-move/move-class.cpp b/clang-tools-extra/test/clang-move/move-class.cpp index 0c23608a9e9..93d8c4ed215 100644 --- a/clang-tools-extra/test/clang-move/move-class.cpp +++ b/clang-tools-extra/test/clang-move/move-class.cpp @@ -1,21 +1,25 @@ // RUN: mkdir -p %T/clang-move/build +// RUN: mkdir -p %T/clang-move/include +// RUN: mkdir -p %T/clang-move/src // RUN: sed 's|$test_dir|%/T/clang-move|g' %S/Inputs/database_template.json > %T/clang-move/compile_commands.json -// RUN: cp %S/Inputs/test* %T/clang-move/ -// RUN: touch %T/clang-move/test2.h -// RUN: cd %T/clang-move -// RUN: clang-move -name="a::Foo" -new_cc=%T/clang-move/new_test.cpp -new_header=%T/clang-move/new_test.h -old_cc=../clang-move/test.cpp -old_header=../clang-move/test.h %T/clang-move/test.cpp +// RUN: cp %S/Inputs/test.h %T/clang-move/include +// RUN: cp %S/Inputs/test.cpp %T/clang-move/src +// RUN: touch %T/clang-move/include/test2.h +// RUN: cd %T/clang-move/build +// RUN: clang-move -name="a::Foo" -new_cc=%T/clang-move/new_test.cpp -new_header=%T/clang-move/new_test.h -old_cc=../src/test.cpp -old_header=../include/test.h %T/clang-move/src/test.cpp // RUN: FileCheck -input-file=%T/clang-move/new_test.cpp -check-prefix=CHECK-NEW-TEST-CPP %s // RUN: FileCheck -input-file=%T/clang-move/new_test.h -check-prefix=CHECK-NEW-TEST-H %s -// RUN: FileCheck -input-file=%T/clang-move/test.cpp -check-prefix=CHECK-OLD-TEST-CPP %s -// RUN: FileCheck -input-file=%T/clang-move/test.h %s -implicit-check-not='{{namespace.*}}' +// RUN: FileCheck -input-file=%T/clang-move/src/test.cpp -check-prefix=CHECK-OLD-TEST-CPP %s +// RUN: FileCheck -input-file=%T/clang-move/include/test.h %s -implicit-check-not='{{namespace.*}}' // -// RUN: cp %S/Inputs/test* %T/clang-move/ -// RUN: cd %T/clang-move -// RUN: clang-move -name="a::Foo" -new_cc=%T/clang-move/new_test.cpp -new_header=%T/clang-move/new_test.h -old_cc=%T/clang-move/test.cpp -old_header=%T/clang-move/test.h %T/clang-move/test.cpp +// RUN: cp %S/Inputs/test.h %T/clang-move/include +// RUN: cp %S/Inputs/test.cpp %T/clang-move/src +// RUN: cd %T/clang-move/build +// RUN: clang-move -name="a::Foo" -new_cc=%T/clang-move/new_test.cpp -new_header=%T/clang-move/new_test.h -old_cc=%T/clang-move/src/test.cpp -old_header=%T/clang-move/include/test.h %T/clang-move/src/test.cpp // RUN: FileCheck -input-file=%T/clang-move/new_test.cpp -check-prefix=CHECK-NEW-TEST-CPP %s // RUN: FileCheck -input-file=%T/clang-move/new_test.h -check-prefix=CHECK-NEW-TEST-H %s -// RUN: FileCheck -input-file=%T/clang-move/test.cpp -check-prefix=CHECK-OLD-TEST-CPP %s -// RUN: FileCheck -input-file=%T/clang-move/test.h %s -implicit-check-not='{{namespace.*}}' +// RUN: FileCheck -input-file=%T/clang-move/src/test.cpp -check-prefix=CHECK-OLD-TEST-CPP %s +// RUN: FileCheck -input-file=%T/clang-move/include/test.h %s -implicit-check-not='{{namespace.*}}' // // CHECK-NEW-TEST-H: namespace a { // CHECK-NEW-TEST-H: class Foo { |

