[PATCH] D157445: [CodeGen][UBSan] Add support for handling attributed functions in getUBSanFunctionTypeHash.
Fangrui Song via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Aug 9 13:30:20 PDT 2023
MaskRay added inline comments.
================
Comment at: clang/test/CodeGen/ubsan-function-attributed.c:4
+//Make sure compiler does not crash inside getUBSanFunctionTypeHash while compiling this
+long __attribute__((ms_abi)) f() {}
----------------
https://maskray.me/blog/2021-08-08-toolchain-testing#the-test-checks-too-little
"A regression test which simply runs the compiler and expects it not to crash has low utilization. It is often better to additionally test some properties of the produced object file."
I think it's better to define another function without `__attribute__((ms_abi))`, and check that the two functions have the same type hash.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D157445/new/
https://reviews.llvm.org/D157445
More information about the cfe-commits
mailing list