Revert "[llvm] Improve llvm.objectsize computation by computing GEP, alloca and mallo...
[llvm-project.git] / clang / test / CodeGen / ubsan-function.c
blobc3113757b468a1f4c21579c0f890239f7758dde3
1 // RUN: %clang_cc1 -emit-llvm -triple x86_64 -std=c17 -fsanitize=function %s -o - | FileCheck %s
3 // CHECK-LABEL: define{{.*}} @call_no_prototype(
4 // CHECK-NOT: __ubsan_handle_function_type_mismatch
5 void call_no_prototype(void (*f)()) { f(); }
7 // CHECK-LABEL: define{{.*}} @call_prototype(
8 // CHECK: __ubsan_handle_function_type_mismatch
9 void call_prototype(void (*f)(void)) { f(); }