Author: Shoaib Meenai Date: 2022-11-30T23:09:28-08:00 New Revision: df43ec30ab66f5af7bbf87e121e0fe26aad478b4
URL: https://github.com/llvm/llvm-project/commit/df43ec30ab66f5af7bbf87e121e0fe26aad478b4 DIFF: https://github.com/llvm/llvm-project/commit/df43ec30ab66f5af7bbf87e121e0fe26aad478b4.diff LOG: [Driver] Add test for -stdlib++-isystem with -nostdinc This further clarifies the intent of the flag. Added: Modified: clang/test/Driver/stdlibxx-isystem.cpp Removed: ################################################################################ diff --git a/clang/test/Driver/stdlibxx-isystem.cpp b/clang/test/Driver/stdlibxx-isystem.cpp index 827cdf9a7c71..d4888984fdf1 100644 --- a/clang/test/Driver/stdlibxx-isystem.cpp +++ b/clang/test/Driver/stdlibxx-isystem.cpp @@ -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" _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits