[PATCH] D95244: [clang][AST] Handle overload callee type in CallExpr::getCallReturnType.
Gabor Marton via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Mar 9 02:29:31 PST 2021
martong added a comment.
> This causes a crash if the function is called in such case.
Is the crash caused by the below assertion?
QualType Expr::findBoundMemberType(const Expr *expr) {
assert(expr->hasPlaceholderType(BuiltinType::BoundMember));
================
Comment at: clang/lib/AST/Expr.cpp:1403
+ if (CalleeType.isNull())
+ return CreateDependentType();
+
----------------
balazske wrote:
> I am not sure if dependent type is here (and later) the correct value to return. But only a null type is another possibility.
Perhaps we should handle this similarly as the type of `UnresolvedMemberExpr` or `OverloadExpr`? Which I assume is a null type.
================
Comment at: clang/unittests/Tooling/SourceCodeTest.cpp:642-644
+ f_overload(p);
+ A a;
+ a.f(p);
----------------
Do we have the crash with both `f_overload` and with `a.f(p)` calls?
If yes, then please create two separate test cases.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D95244/new/
https://reviews.llvm.org/D95244
More information about the cfe-commits
mailing list