diff options
Diffstat (limited to 'test/Driver/ubsan-ld.c')
-rw-r--r-- | test/Driver/ubsan-ld.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/test/Driver/ubsan-ld.c b/test/Driver/ubsan-ld.c index 775e669944..4a17e7c72f 100644 --- a/test/Driver/ubsan-ld.c +++ b/test/Driver/ubsan-ld.c @@ -1,6 +1,6 @@ // Test UndefinedBehaviorSanitizer ld flags. -// RUN: %clang -fcatch-undefined-behavior %s -### -o %t.o 2>&1 \ +// RUN: %clang -fsanitize=undefined %s -### -o %t.o 2>&1 \ // RUN: -target i386-unknown-linux \ // RUN: --sysroot=%S/Inputs/basic_linux_tree \ // RUN: | FileCheck --check-prefix=CHECK-LINUX %s @@ -8,3 +8,11 @@ // CHECK-LINUX-NOT: "-lc" // CHECK-LINUX: libclang_rt.ubsan-i386.a" // CHECK-LINUX: "-lpthread" + +// RUN: %clang -fsanitize=bounds %s -### -o %t.o 2>&1 \ +// RUN: -target i386-unknown-linux \ +// RUN: --sysroot=%S/Inputs/basic_linux_tree \ +// RUN: | FileCheck --check-prefix=CHECK-LINUX1 %s +// CHECK-LINUX1: "{{.*}}ld{{(.exe)?}}" +// CHECK-LINUX1-NOT: libclang_rt.ubsan-i386.a" +// CHECK-LINUX1-NOT: "-lpthread" |