File tree 2 files changed +4
-2
lines changed 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -1002,6 +1002,8 @@ class Sema;
1002
1002
// / using either a parenthesized or braced list of arguments.
1003
1003
CSK_InitByConstructor,
1004
1004
1005
+ // / C++ [over.match.call.general]
1006
+ // / Resolve a call through the address of an overload set.
1005
1007
CSK_AddressOfOverloadSet,
1006
1008
};
1007
1009
Original file line number Diff line number Diff line change @@ -5826,11 +5826,11 @@ static bool isParenthetizedAndQualifiedAddressOfExpr(Expr *Fn) {
5826
5826
if (!UO || UO->getOpcode() != clang::UO_AddrOf)
5827
5827
return false;
5828
5828
if (auto *DRE = dyn_cast<DeclRefExpr>(UO->getSubExpr()->IgnoreParens())) {
5829
+ assert(isa<FunctionDecl>(DRE->getDecl()) && "expected a function");
5829
5830
return DRE->hasQualifier();
5830
5831
}
5831
- if (auto *OVL = dyn_cast<OverloadExpr>(UO->getSubExpr()->IgnoreParens())) {
5832
+ if (auto *OVL = dyn_cast<OverloadExpr>(UO->getSubExpr()->IgnoreParens()))
5832
5833
return OVL->getQualifier();
5833
- }
5834
5834
return false;
5835
5835
}
5836
5836
You can’t perform that action at this time.
0 commit comments