aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
authorYuanfang Chen <yuanfang.chen@sony.com>2021-03-24 16:03:13 -0700
committerYuanfang Chen <yuanfang.chen@sony.com>2021-03-24 16:04:18 -0700
commit217f0f735afec57a51fa6f9ab863d4713a2f85e2 (patch)
treea0fe7682c39c95c80c680280c62edf5f64c4c75e /clang/lib/Frontend/CompilerInvocation.cpp
parentef69aa961d12dee2141a79b05c9637d8cc9c0c74 (diff)
downloadllvm-217f0f735afec57a51fa6f9ab863d4713a2f85e2.zip
llvm-217f0f735afec57a51fa6f9ab863d4713a2f85e2.tar.gz
llvm-217f0f735afec57a51fa6f9ab863d4713a2f85e2.tar.bz2
[Clang][Sema] Implement GCC -Wcast-function-type
``` Warn when a function pointer is cast to an incompatible function pointer. In a cast involving function types with a variable argument list only the types of initial arguments that are provided are considered. Any parameter of pointer-type matches any other pointer-type. Any benign differences in integral types are ignored, like int vs. long on ILP32 targets. Likewise type qualifiers are ignored. The function type void (*) (void) is special and matches everything, which can be used to suppress this warning. In a cast involving pointer to member types this warning warns whenever the type cast is changing the pointer to member type. This warning is enabled by -Wextra. ``` Reviewed By: rsmith Differential Revision: https://reviews.llvm.org/D97831
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
0 files changed, 0 insertions, 0 deletions