[Driver] Add test for -stdlib++-isystem with -nostdinc

This further clarifies the intent of the flag.
This commit is contained in:
Shoaib Meenai 2022-11-30 23:09:28 -08:00
parent 25ddac98f8
commit df43ec30ab
1 changed files with 10 additions and 0 deletions

View File

@ -51,3 +51,13 @@
// RUN: -stdlib++-isystem /tmp/foo -stdlib++-isystem /tmp/bar -nostdinc++ \
// RUN: -fsyntax-only %s -### 2>&1 | FileCheck -check-prefix=NOSTDINCXX %s
// NOSTDINCXX-NOT: "-internal-isystem" "/tmp/foo" "-internal-isystem" "/tmp/bar"
// It should take effect even if -nostdinc or -nostdlibinc are specified; only
// -nostdinc++ should suppress it.
// RUN: %clang -target aarch64-linux-gnu -ccc-install-dir %t/bin \
// RUN: -stdlib++-isystem /tmp/foo -stdlib++-isystem /tmp/bar -nostdinc \
// RUN: -fsyntax-only %s -### 2>&1 | FileCheck -check-prefix=NOSTDINC %s
// RUN: %clang -target x86_64-apple-darwin -ccc-install-dir %t/bin \
// RUN: -stdlib++-isystem /tmp/foo -stdlib++-isystem /tmp/bar -nostdlibinc \
// RUN: -fsyntax-only %s -### 2>&1 | FileCheck -check-prefix=NOSTDINC %s
// NOSTDINC: "-internal-isystem" "/tmp/foo" "-internal-isystem" "/tmp/bar"