Skip to content

Commit 189941c

Browse files
committed
Added a test.
1 parent 8885f82 commit 189941c

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
// RUN: %clang -fsanitize=implicit-integer-sign-change %s -o %t && %run %t 0 2>&1 | FileCheck %s
2+
#include <stdio.h>
3+
#include <stdint.h>
4+
#include <stdlib.h>
5+
6+
static int Result;
7+
8+
void __ubsan_report_error(const char *msg, uintptr_t caller, int abort) {
9+
fprintf(stderr, "CUSTOM_CALLBACK: %s %d\n", msg, abort);
10+
}
11+
12+
int main(int argc, const char** argv) {
13+
int32_t t0 = (~((uint32_t)0));
14+
// CHECK: CUSTOM_CALLBACK: implicit-conversion 0
15+
}

0 commit comments

Comments
 (0)