summaryrefslogtreecommitdiff
path: root/cross-project-tests
diff options
context:
space:
mode:
authorSami Tolvanen <samitolvanen@google.com>2022-09-19 23:06:18 +0000
committerSami Tolvanen <samitolvanen@google.com>2022-10-26 20:38:37 +0000
commit1aad641c793090b4d036c03e737df2ebe2c32c57 (patch)
tree5c195c2b54e067d0076a8807c398cc49a0116fab /cross-project-tests
parent2234f582c91e8511443f3e71b6e06abe3e47db4b (diff)
downloadllvm-1aad641c793090b4d036c03e737df2ebe2c32c57.tar.gz
[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
Diffstat (limited to 'cross-project-tests')
0 files changed, 0 insertions, 0 deletions