From 222e2a7620e6520ffaf4fc4e69d79c18da31542e Mon Sep 17 00:00:00 2001 From: "Zancanaro; Carlo" Date: Mon, 24 Sep 2012 09:58:17 +1000 Subject: Add the clang library to the repo (with some of my changes, too). --- clang/test/Driver/cpath.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 clang/test/Driver/cpath.c (limited to 'clang/test/Driver/cpath.c') diff --git a/clang/test/Driver/cpath.c b/clang/test/Driver/cpath.c new file mode 100644 index 0000000..bd7c8d0 --- /dev/null +++ b/clang/test/Driver/cpath.c @@ -0,0 +1,22 @@ +// RUN: mkdir -p %T/test1 %T/test2 %T/test3 + +// RUN: env "CPATH=%T/test1%{pathsep}%T/test2" %clang -x c -E -v %s 2>&1 | FileCheck %s -check-prefix=CPATH +// CPATH: -I {{.*}}/test1 +// CPATH: -I {{.*}}/test2 +// CPATH: search starts here +// CPATH: test1 +// CPATH: test2 + +// RUN: env "OBJC_INCLUDE_PATH=%T/test1%{pathsep}%T/test2" OBJCPLUS_INCLUDE_PATH=%T/test1 "CPLUS_INCLUDE_PATH=%T/test1%{pathsep}%t/test2" C_INCLUDE_PATH=%T/test3 %clang -x c -E -v %s 2>&1 | FileCheck %s -check-prefix=C_INCLUDE_PATH +// C_INCLUDE_PATH: -c-isystem {{"?.*}}/test3{{"?}} -cxx-isystem {{"?.*}}/test1{{"?}} -cxx-isystem {{"?.*}}/test2{{"?}} -objc-isystem {{"?.*}}/test1{{"?}} -objc-isystem {{"?.*}}/test2{{"?}} -objcxx-isystem {{"?.*}}/test1{{"?}} +// C_INCLUDE_PATH: search starts here +// C_INCLUDE_PATH-NOT: test1 +// C_INCLUDE_PATH: test3 +// C_INCLUDE_PATH-NOT: test1 + +// RUN: env OBJC_INCLUDE_PATH=%T/test1 OBJCPLUS_INCLUDE_PATH=%T/test3 CPLUS_INCLUDE_PATH=%T/test3 C_INCLUDE_PATH=%T/test1 %clang -x objective-c++ -E -v %s 2>&1 | FileCheck %s -check-prefix=OBJCPLUS_INCLUDE_PATH +// OBJCPLUS_INCLUDE_PATH: -c-isystem {{"?.*}}/test1{{"?}} -cxx-isystem {{"?.*}}/test3{{"?}} -objc-isystem {{"?.*}}/test1{{"?}} -objcxx-isystem {{"?.*}}/test3{{"?}} +// OBJCPLUS_INCLUDE_PATH: search starts here +// OBJCPLUS_INCLUDE_PATH-NOT: test1 +// OBJCPLUS_INCLUDE_PATH: test3 +// OBJCPLUS_INCLUDE_PATH-NOT: test1 -- cgit v1.2.3