summaryrefslogtreecommitdiff
path: root/test/Driver/cl-include.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/Driver/cl-include.c')
-rw-r--r--test/Driver/cl-include.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/test/Driver/cl-include.c b/test/Driver/cl-include.c
index d3dc006e575f1..a69265deed02c 100644
--- a/test/Driver/cl-include.c
+++ b/test/Driver/cl-include.c
@@ -10,5 +10,16 @@
// RUN: env INCLUDE=/my/system/inc %clang_cl -### -- %s 2>&1 | FileCheck %s --check-prefix=STDINC
// STDINC: "-internal-isystem" "/my/system/inc"
-// RUN: env INCLUDE=/my/system/inc %clang_cl -nostdinc -### -- %s 2>&1 | FileCheck %s --check-prefix=NOSTDINC
+// -nostdinc suppresses all of %INCLUDE%, clang resource dirs, and -imsvc dirs.
+// RUN: env INCLUDE=/my/system/inc %clang_cl -nostdinc -imsvc /my/other/inc -### -- %s 2>&1 | FileCheck %s --check-prefix=NOSTDINC
+// NOSTDINC: argument unused{{.*}}-imsvc
// NOSTDINC-NOT: "-internal-isystem" "/my/system/inc"
+// NOSTDINC-NOT: "-internal-isystem" "{{.*lib.*clang.*include}}"
+// NOSTDINC-NOT: "-internal-isystem" "/my/other/inc"
+
+// /X suppresses %INCLUDE% but not clang resource dirs or -imsvc dirs.
+// RUN: env INCLUDE=/my/system/inc %clang_cl /X -imsvc /my/other/inc -### -- %s 2>&1 | FileCheck %s --check-prefix=SLASHX
+// SLASHX-NOT: "argument unused{{.*}}-imsvc"
+// SLASHX-NOT: "-internal-isystem" "/my/system/inc"
+// SLASHX: "-internal-isystem" "{{.*lib.*clang.*include}}"
+// SLASHX: "-internal-isystem" "/my/other/inc"