[clang] [Clang] FunctionEffects: properly extract the type of a bound member member function from a CallExpr. (PR #166101)
via cfe-commits
cfe-commits at lists.llvm.org
Mon Nov 3 04:32:46 PST 2025
================
@@ -1208,8 +1208,17 @@ class Analyzer {
return true;
}
- // No Decl, just an Expr. Just check based on its type.
- checkIndirectCall(Call, CalleeExpr->getType());
+ // No Decl, just an Expr. Just check based on its type. Bound member
+ // functions are a special expression type and need to be specially
+ // unpacked.
+ QualType CalleeExprQT = CalleeExpr->getType();
+ if (CalleeExpr->isBoundMemberFunction(Outer.S.getASTContext())) {
+ QualType QT = Expr::findBoundMemberType(CalleeExpr);
+ if (!QT.isNull()) {
+ CalleeExprQT = QT;
+ }
----------------
Sirraide wrote:
```suggestion
if (!QT.isNull())
CalleeExprQT = QT;
```
nit
https://github.com/llvm/llvm-project/pull/166101
More information about the cfe-commits
mailing list