[PATCH] D157445: [CodeGen][UBSan] Add support for handling attributed functions in getUBSanFunctionTypeHash.

Julian Lettner via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Aug 9 16:37:53 PDT 2023


yln 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() {}
----------------
MaskRay wrote:
> 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.
I agree with this and particularly this sounds like a good approach:
> 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