[clang] Return available function types for BindingDecls. (PR #102196)
Samira Bazuzi via cfe-commits
cfe-commits at lists.llvm.org
Tue Aug 6 12:19:40 PDT 2024
bazuzi wrote:
For the following:
```
template <typename A, typename B>
struct Pair {
Pair();
A a;
B b;
};
void target(int *i) {
Pair<void (*)(int *), bool> p;
auto [fp, b] = p;
fp(i);
}
```
Running or compiling this code presents no misbehavior that I know of, but when running a dataflow analysis that queries `getFunctionType()` for `fp`, `nullptr` was returned, when in fact there was a valid type expected, roughly `void (*)(int*)`.
https://github.com/llvm/llvm-project/pull/102196
More information about the cfe-commits
mailing list