summaryrefslogtreecommitdiffstats
path: root/clang/test
diff options
context:
space:
mode:
authorNico Weber <nicolasweber@gmx.de>2016-04-12 19:04:37 +0000
committerNico Weber <nicolasweber@gmx.de>2016-04-12 19:04:37 +0000
commitfd3e1ad0ce073e67c21833e56b74105ce8339ce3 (patch)
treeb1b823b56c70885631d99fba78756503baf0b6b8 /clang/test
parentb7b6d0fc664f974512279a55a07bebbeb0c3b129 (diff)
downloadbcm5719-llvm-fd3e1ad0ce073e67c21833e56b74105ce8339ce3.tar.gz
bcm5719-llvm-fd3e1ad0ce073e67c21833e56b74105ce8339ce3.zip
clang-cl: Remove -isystem, add -imsvc.
r260990 exposed -isystem in clang-cl. -isystem adds a directory to the front of the system include search path. The idea was to use this to point to a hermetic msvc install, but as it turns out this doesn't work: -isystem then adds the hermetic headers in front of clang's builtin headers, and clang's headers that are supposed to wrap msvc headers (say, stdarg.h) aren't picked up at all anymore. So revert that, and instead expose -imsvc which works as if the passed directory was part of %INCLUDE%: The header is treated as a system header, but it is searched after clang's lib/Header headers. Fixes half of PRPR26751. llvm-svn: 266108
Diffstat (limited to 'clang/test')
-rw-r--r--clang/test/Driver/cl-options.c7
-rw-r--r--clang/test/Driver/cl-pch-search.cpp4
2 files changed, 6 insertions, 5 deletions
diff --git a/clang/test/Driver/cl-options.c b/clang/test/Driver/cl-options.c
index c9e857332d7..4f82c5ade17 100644
--- a/clang/test/Driver/cl-options.c
+++ b/clang/test/Driver/cl-options.c
@@ -82,6 +82,12 @@
// RUN: %clang_cl /I myincludedir -### -- %s 2>&1 | FileCheck -check-prefix=SLASH_I %s
// SLASH_I: "-I" "myincludedir"
+// RUN: %clang_cl /imsvcmyincludedir -### -- %s 2>&1 | FileCheck -check-prefix=SLASH_imsvc %s
+// RUN: %clang_cl /imsvc myincludedir -### -- %s 2>&1 | FileCheck -check-prefix=SLASH_imsvc %s
+// Clang's resource header directory should be first:
+// SLASH_imsvc: "-internal-isystem" "{{[^"]*}}lib{{.}}clang{{[^"]*}}include"
+// SLASH_imsvc: "-internal-isystem" "myincludedir"
+
// RUN: %clang_cl /J -### -- %s 2>&1 | FileCheck -check-prefix=J %s
// J: -fno-signed-char
@@ -452,7 +458,6 @@
// RUN: -fno-ms-compatibility \
// RUN: -fms-extensions \
// RUN: -fno-ms-extensions \
-// RUN: -isystem=some/path \
// RUN: -mllvm -disable-llvm-optzns \
// RUN: -Wunused-variable \
// RUN: -fmacro-backtrace-limit=0 \
diff --git a/clang/test/Driver/cl-pch-search.cpp b/clang/test/Driver/cl-pch-search.cpp
index fd503f1f801..118cf19efbd 100644
--- a/clang/test/Driver/cl-pch-search.cpp
+++ b/clang/test/Driver/cl-pch-search.cpp
@@ -4,7 +4,3 @@
// REQUIRES: x86-registered-target
// Check that pchfile.h next to to pchfile.cc is found correctly.
// RUN: %clang_cl -Werror /Ycpchfile.h /FIpchfile.h /c /Fo%t.obj /Fp%t.pch -- %S/Inputs/pchfile.cpp
-
-// Check that i_group flags other than -include aren't skipped (e.g. -isystem).
-#include "header0.h"
-// RUN: %clang_cl -Werror -isystem%S/Inputs /Yupchfile.h /FIpchfile.h /c /Fo%t.obj /Fp%t.pch -- %s
OpenPOWER on IntegriCloud