Skip to content

Commit

Permalink
fix formatting on docs
Browse files Browse the repository at this point in the history
Signed-off-by: Justin Stitt <justinstitt@google.com>
  • Loading branch information
JustinStitt committed Sep 4, 2024
1 parent 0c1c6e1 commit c272836
Showing 1 changed file with 17 additions and 17 deletions.
34 changes: 17 additions & 17 deletions clang/test/CodeGen/ubsan-type-ignorelist.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
// 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

class Bar {
public:
virtual ~Bar() {}
public:
virtual ~Bar() {}
};
class Foo : public Bar {};

Expand All @@ -35,21 +35,21 @@ Bar bar;
// VPTR: @_Z7checkmev
// VPTR-TYPE: @_Z7checkmev
void checkme() {
// VPTR: call void @__ubsan_handle_dynamic_type_cache_miss({{.*}} (ptr @bar to
// VPTR-TYPE-NOT: @__ubsan_handle_dynamic_type_cache_miss
// VPTR: call void @__ubsan_handle_dynamic_type_cache_miss({{.*}} (ptr @bar to
// VPTR-TYPE-NOT: @__ubsan_handle_dynamic_type_cache_miss
Foo* foo = static_cast<Foo*>(&bar); // down-casting
// VPTR: ret void
// VPTR-TYPE: ret void
// VPTR: ret void
// VPTR-TYPE: ret void
return;
}

// INT-LABEL: ignore_int
void ignore_int(int A, int B, unsigned C, unsigned D, long E) {
// INT: llvm.uadd.with.overflow.i32
// INT: llvm.uadd.with.overflow.i32
(void)(C+D);
// INT-NOT: llvm.sadd.with.overflow.i32
// INT-NOT: llvm.sadd.with.overflow.i32
(void)(A+B);
// INT: llvm.sadd.with.overflow.i64
// INT: llvm.sadd.with.overflow.i64
(void)(++E);
}

Expand All @@ -59,31 +59,31 @@ typedef myty derivative;
// INT-LABEL: ignore_all_except_myty
// MYTY-LABEL: ignore_all_except_myty
void ignore_all_except_myty(myty A, myty B, int C, unsigned D, derivative E) {
// MYTY-NOT: llvm.sadd.with.overflow.i32
// MYTY-NOT: llvm.sadd.with.overflow.i32
(void)(++C);

// MYTY-NOT: llvm.uadd.with.overflow.i32
// MYTY-NOT: llvm.uadd.with.overflow.i32
(void)(D+D);

// MYTY-NOT: llvm.umul.with.overflow.i64
// MYTY-NOT: llvm.umul.with.overflow.i64
(void)(E*2);

// MYTY: llvm.uadd.with.overflow.i64
// MYTY: llvm.uadd.with.overflow.i64
(void)(A+B);
}

// INT-LABEL: truncation
// MYTY-LABEL: truncation
// TRUNC-LABEL: truncation
void truncation(char A, int B, unsigned char C, short D) {
// TRUNC-NOT: %handler.implicit_conversion
// TRUNC-NOT: %handler.implicit_conversion
A = B;
// TRUNC-NOT: %handler.implicit_conversion
// TRUNC-NOT: %handler.implicit_conversion
A = C;
// TRUNC-NOT: %handler.implicit_conversion
// TRUNC-NOT: %handler.implicit_conversion
C = B;

// TRUNC: %handler.implicit_conversion
// TRUNC: %handler.implicit_conversion
D = B;

(void)A;
Expand Down

0 comments on commit c272836

Please sign in to comment.