Sami Tolvanen 1aad641c79 [Clang][Sema] Add -Wcast-function-type-strict
Clang supports indirect call Control-Flow Integrity (CFI) sanitizers
(e.g. -fsanitize=cfi-icall), which enforce an exact type match between
a function pointer and the target function. Unfortunately, Clang
doesn't provide diagnostics that would help developers avoid function
type casts that lead to runtime CFI failures. -Wcast-function-type,
while helpful, only warns about ABI incompatibility, which isn't
sufficient with CFI.

Add -Wcast-function-type-strict, which checks for a strict type
compatibility in function type casts and helps warn about casts that
can potentially lead to CFI failures.

Reviewed By: nickdesaulniers, aaron.ballman

Differential Revision: https://reviews.llvm.org/D134831
2022-10-26 20:38:37 +00:00
..
2022-01-28 11:55:46 -08:00
2022-09-06 09:52:22 -04:00
2022-08-24 22:41:38 +00:00
2022-06-26 19:22:52 +05:30
2022-09-16 07:19:30 -04:00

See llvm/docs/README.txt