2525// RUN: %clang_cc1 -triple x86_64-linux-gnu -fsanitize=vptr -fsanitize-recover=vptr -fsanitize-ignorelist=%t-type.ignorelist -emit-llvm %s -o - | FileCheck %s --check-prefix=VPTR-TYPE
2626
2727class Bar {
28- public:
29- virtual ~Bar () {}
28+ public:
29+ virtual ~Bar () {}
3030};
3131class Foo : public Bar {};
3232
@@ -35,21 +35,21 @@ Bar bar;
3535// VPTR: @_Z7checkmev
3636// VPTR-TYPE: @_Z7checkmev
3737void checkme () {
38- // VPTR: call void @__ubsan_handle_dynamic_type_cache_miss({{.*}} (ptr @bar to
39- // VPTR-TYPE-NOT: @__ubsan_handle_dynamic_type_cache_miss
38+ // VPTR: call void @__ubsan_handle_dynamic_type_cache_miss({{.*}} (ptr @bar to
39+ // VPTR-TYPE-NOT: @__ubsan_handle_dynamic_type_cache_miss
4040 Foo* foo = static_cast <Foo*>(&bar); // down-casting
41- // VPTR: ret void
42- // VPTR-TYPE: ret void
41+ // VPTR: ret void
42+ // VPTR-TYPE: ret void
4343 return ;
4444}
4545
4646// INT-LABEL: ignore_int
4747void ignore_int (int A, int B, unsigned C, unsigned D, long E) {
48- // INT: llvm.uadd.with.overflow.i32
48+ // INT: llvm.uadd.with.overflow.i32
4949 (void )(C+D);
50- // INT-NOT: llvm.sadd.with.overflow.i32
50+ // INT-NOT: llvm.sadd.with.overflow.i32
5151 (void )(A+B);
52- // INT: llvm.sadd.with.overflow.i64
52+ // INT: llvm.sadd.with.overflow.i64
5353 (void )(++E);
5454}
5555
@@ -59,31 +59,31 @@ typedef myty derivative;
5959// INT-LABEL: ignore_all_except_myty
6060// MYTY-LABEL: ignore_all_except_myty
6161void ignore_all_except_myty (myty A, myty B, int C, unsigned D, derivative E) {
62- // MYTY-NOT: llvm.sadd.with.overflow.i32
62+ // MYTY-NOT: llvm.sadd.with.overflow.i32
6363 (void )(++C);
6464
65- // MYTY-NOT: llvm.uadd.with.overflow.i32
65+ // MYTY-NOT: llvm.uadd.with.overflow.i32
6666 (void )(D+D);
6767
68- // MYTY-NOT: llvm.umul.with.overflow.i64
68+ // MYTY-NOT: llvm.umul.with.overflow.i64
6969 (void )(E*2 );
7070
71- // MYTY: llvm.uadd.with.overflow.i64
71+ // MYTY: llvm.uadd.with.overflow.i64
7272 (void )(A+B);
7373}
7474
7575// INT-LABEL: truncation
7676// MYTY-LABEL: truncation
7777// TRUNC-LABEL: truncation
7878void truncation (char A, int B, unsigned char C, short D) {
79- // TRUNC-NOT: %handler.implicit_conversion
79+ // TRUNC-NOT: %handler.implicit_conversion
8080 A = B;
81- // TRUNC-NOT: %handler.implicit_conversion
81+ // TRUNC-NOT: %handler.implicit_conversion
8282 A = C;
83- // TRUNC-NOT: %handler.implicit_conversion
83+ // TRUNC-NOT: %handler.implicit_conversion
8484 C = B;
8585
86- // TRUNC: %handler.implicit_conversion
86+ // TRUNC: %handler.implicit_conversion
8787 D = B;
8888
8989 (void )A;
0 commit comments