diff options
author | Douglas Gregor <dgregor@apple.com> | 2009-12-02 18:12:28 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2009-12-02 18:12:28 +0000 |
commit | 407e2124bf2d692fb147e111f668f6869ae19990 (patch) | |
tree | 06889de567f2563abbba650a6026b50670b7c8f3 /clang/test/Misc/remap-file.c | |
parent | f98849eb8aa991668e5c47eeb7b2899772af3810 (diff) | |
download | bcm5719-llvm-407e2124bf2d692fb147e111f668f6869ae19990.tar.gz bcm5719-llvm-407e2124bf2d692fb147e111f668f6869ae19990.zip |
Extend -remap-file=from;to to permit mapping from a non-existent
file. This is accomplished by introducing the notion of a "virtual"
file into the file manager, which provides a FileEntry* for a named
file whose size and modification time are known but which may not
exist on disk.
Added a cute little test that remaps both a .c file and a .h file it
includes to alternative files.
llvm-svn: 90329
Diffstat (limited to 'clang/test/Misc/remap-file.c')
-rw-r--r-- | clang/test/Misc/remap-file.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/clang/test/Misc/remap-file.c b/clang/test/Misc/remap-file.c index e8aa3e44cc9..da10590ccd6 100644 --- a/clang/test/Misc/remap-file.c +++ b/clang/test/Misc/remap-file.c @@ -1,5 +1,8 @@ -// RUN: clang-cc -remap-file="%s;%S/Inputs/remapped-file" -fsyntax-only %s 2>&1 | FileCheck %s - -// CHECK: remap-file.c:1:28: warning: incompatible pointer types +// RUN: clang-cc -remap-file="%s;%S/Inputs/remapped-file" -fsyntax-only %s 2>&1 | FileCheck -check-prefix=CHECK-EXIST %s +// RUN: clang-cc -remap-file="%S/nonexistent.c;%S/Inputs/remapped-file" -fsyntax-only %S/nonexistent.c 2>&1 | FileCheck -check-prefix=CHECK-NONEXIST %s +// RUN: clang-cc -remap-file="%S/nonexistent.c;%S/Inputs/remapped-file-2" -remap-file="%S/nonexistent.h;%S/Inputs/remapped-file-3" -fsyntax-only %S/nonexistent.c 2>&1 | FileCheck -check-prefix=CHECK-HEADER %s +// CHECK-EXIST: remap-file.c:1:28: warning: incompatible pointer types +// CHECK-NONEXIST: nonexistent.c:1:28: warning: incompatible pointer types +// CHECK-HEADER: nonexistent.c:3:19: warning: incompatible pointer types int |