[all-commits] [llvm/llvm-project] 4da728: Silence -Wcast-function-type warnings on idiomatic...
Aaron Ballman via All-commits
all-commits at lists.llvm.org
Tue Apr 15 14:34:49 PDT 2025
Branch: refs/heads/release/20.x
Home: https://github.com/llvm/llvm-project
Commit: 4da7285e636e2783835e5c1d0c9e998e9ec0ff49
https://github.com/llvm/llvm-project/commit/4da7285e636e2783835e5c1d0c9e998e9ec0ff49
Author: Aaron Ballman <aaron at aaronballman.com>
Date: 2025-04-15 (Tue, 15 Apr 2025)
Changed paths:
M clang/docs/ReleaseNotes.rst
M clang/lib/Sema/SemaCast.cpp
A clang/test/Sema/warn-cast-function-type-win.c
Log Message:
-----------
Silence -Wcast-function-type warnings on idiomatic Windows code (#135660)
On Windows, GetProcAddress() is the API used to dynamically load
function pointers (similar to dlsym on Linux). This API returns a
function pointer (a typedef named FARPROC), which means that casting
from the call to the eventual correct type is technically a function
type mismatch on the cast. However, because this is idiomatic code on
Windows, we should accept it unless -Wcast-function-type-strict is
passed.
This was brought up in post-commit review feedback on
https://github.com/llvm/llvm-project/pull/86131
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list