================
@@ -326,6 +326,12 @@ loc::MemRegionVal SValBuilder::getCXXThis(const
CXXRecordDecl *D,
std::optional<SVal> SValBuilder::getConstantVal(const Expr *E) {
E = E->IgnoreParens();
+ if (E->getType()->isFunctionPointerType()) {
+ if (const auto *FD =
+ dyn_cast_or_null<FunctionDecl>(E->getReferencedDeclOfCallee()))
+ return getFunctionPointer(FD);
+ }
----------------
steakhal wrote:
Does this mean that it wouldn't work for references?
```c++
void fa(unsigned) {}
typedef void (&callback)(unsigned);
callback g = fa; // like here?
extern callback h;
```
https://github.com/llvm/llvm-project/pull/217608
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits