Skip to content

Commit 092966a

Browse files
authored
[Driver] Make regex stricter (#121243)
Follow up to #121221.
1 parent 48bf0a9 commit 092966a

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

clang/test/Driver/sanitizer-ld.c

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
11
// Test sanitizers ld flags.
22

3-
// Match all libclang_rt, excluding platform-inconsistent libs, like
4-
// libclang_rt.builtins, libclang_rt.osx etc.
5-
6-
// DEFINE: %{filecheck} = FileCheck %s --implicit-check-not="libclang_rt.{{([^.]+san|scudo|cfi|safestack|stats|fuzzer|undefined)}}"
3+
// Match all sanitizer related libclang_rt, we are not interested in
4+
// libclang_rt.builtins, libclang_rt.osx, libclang_rt.ios, libclang_rt.watchos
5+
// etc.
6+
//
7+
// If we need to add sanitizer with name starting with excluded laters, e.g.
8+
// `bsan`, we can extend expression like this: `([^iow]|b[^u])`.
9+
//
10+
// DEFINE: %{filecheck} = FileCheck %s --implicit-check-not="libclang_rt.{{([^biow])}}"
711

812
// RUN: %clang -### %s 2>&1 \
913
// RUN: --target=i386-unknown-linux -fuse-ld=ld -fsanitize=address \

0 commit comments

Comments
 (0)