Skip to content

[Driver] Fix implicit-check-not regex #121221

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 4 additions & 9 deletions clang/test/Driver/sanitizer-ld.c
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
// Test sanitizers ld flags.

// Match all libclang_rt, excluding platform-inconsistent builtins.
// Match all libclang_rt, excluding platform-inconsistent libs, like
// libclang_rt.builtins, libclang_rt.osx etc.

// DEFINE: %{filecheck} = FileCheck %s --implicit-check-not="libclang_rt.{{([^b]..|.[^u].|..[^i]).*}}"
// DEFINE: %{filecheck} = FileCheck %s --implicit-check-not="libclang_rt.{{([^.]+san|scudo|cfi|safestack|stats|fuzzer|undefined)}}"

// RUN: %clang -### %s 2>&1 \
// RUN: --target=i386-unknown-linux -fuse-ld=ld -fsanitize=address \
Expand Down Expand Up @@ -37,7 +38,6 @@
// RUN: | %{filecheck} --check-prefix=CHECK-ASAN-NO-LINK-RUNTIME-DARWIN
//
// CHECK-ASAN-NO-LINK-RUNTIME-DARWIN: "{{.*}}ld"
// CHECK-ASAN-NO-LINK-RUNTIME-DARWIN: libclang_rt.osx.a"

// RUN: %clang -fsanitize=address -### %s 2>&1 \
// RUN: --target=x86_64-unknown-linux -fuse-ld=ld \
Expand Down Expand Up @@ -366,7 +366,6 @@
// RUN: | %{filecheck} --check-prefix=CHECK-TYSAN-DARWIN-CXX
// CHECK-TYSAN-DARWIN-CXX: "{{.*}}ld"
// CHECK-TYSAN-DARWIN-CXX: libclang_rt.tysan_osx_dynamic.dylib
// CHECK-TYSAN-DARWIN-CXX: libclang_rt.osx.a
// CHECK-TYSAN-DARWIN-CXX-NOT: -lc++abi

// RUN: %clangxx -### %s 2>&1 \
Expand Down Expand Up @@ -403,7 +402,7 @@
// RUN: --sysroot=%S/Inputs/basic_linux_tree \
// RUN: | %{filecheck} --check-prefix=CHECK-TSAN-NO-LINK-RUNTIME-DARWIN
//
// CHECK-TSAN-NO-LINK-RUNTIME-DARWIN: libclang_rt.ios.a
// CHECK-TSAN-NO-LINK-RUNTIME-DARWIN: "{{(.*[^-.0-9A-Z_a-z])?}}ld"

// RUN: %clangxx -### %s 2>&1 \
// RUN: --target=x86_64-unknown-linux -fuse-ld=ld -stdlib=platform -lstdc++ \
Expand Down Expand Up @@ -473,7 +472,6 @@
// RUN: | %{filecheck} --check-prefix=CHECK-UBSAN-NO-LINK-RUNTIME-DARWIN
//
// CHECK-UBSAN-NO-LINK-RUNTIME-DARWIN: "{{.*}}ld"
// CHECK-UBSAN-NO-LINK-RUNTIME-DARWIN: libclang_rt.osx.a

// RUN: %clang -fsanitize=fuzzer -fno-sanitize-link-runtime -### %s 2>&1 \
// RUN: --target=arm64e-apple-watchos -fuse-ld=ld \
Expand All @@ -482,7 +480,6 @@
// RUN: | %{filecheck} --check-prefix=CHECK-FUZZER-NO-LINK-RUNTIME-DARWIN
//
// CHECK-FUZZER-NO-LINK-RUNTIME-DARWIN: "{{.*}}ld"
// CHECK-FUZZER-NO-LINK-RUNTIME-DARWIN: libclang_rt.watchos.a

// RUN: %clang -fsanitize=undefined -### %s 2>&1 \
// RUN: --target=i386-unknown-linux -fuse-ld=ld \
Expand Down Expand Up @@ -838,7 +835,6 @@
// CHECK-ASAN-DARWIN106-CXX: "{{.*}}ld"
// CHECK-ASAN-DARWIN106-CXX: libclang_rt.asan_osx_dynamic.dylib
// CHECK-ASAN-DARWIN106-CXX-NOT: -lc++abi
// CHECK-ASAN-DARWIN106-CXX: libclang_rt.osx.a

// RUN: %clangxx -fsanitize=leak -### %s 2>&1 \
// RUN: -mmacos-version-min=10.6 \
Expand All @@ -849,7 +845,6 @@
// CHECK-LSAN-DARWIN106-CXX: "{{.*}}ld"
// CHECK-LSAN-DARWIN106-CXX: libclang_rt.lsan_osx_dynamic.dylib
// CHECK-LSAN-DARWIN106-CXX-NOT: -lc++abi
// CHECK-LSAN-DARWIN106-CXX: libclang_rt.osx.a

// RUN: %clang -### %s 2>&1 \
// RUN: --target=x86_64-unknown-linux -fuse-ld=ld -fsanitize=safe-stack \
Expand Down
Loading