llvm / llvm/llvm-project

[clang-tidy] False negative readability-redundant-casting with function pointer

Open
#170,476 2 comments 0 reactions 0 assignees View on GitHub
clang-tidy false-negative
Dominant language
LLVM
Stars
40.5k
Forks
18.7k
PR merge metrics
PR metrics pending

Description

~~~c++
int f();
int g() {
int (*fp)() = (int(*)())f; // redundant cast
return fp();
}
~~~
https://godbolt.org/z/h8brsnq4z

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.