--- Comment #4 from James Clarke <[hidden email]> ---
(In reply to James Clarke from comment #3)
https://reviews.llvm.org/D58531 fixes this for me. It will still warn if the
declaration is of the wrong type, but no longer warns if the declaration
matches the expected type. This makes it behave like the other builtins
declared in system headers.