[PATCH] D80109: [AST][RecoveryExpr] Preserve type for broken member call expr.
Haojian Wu via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon May 18 02:05:58 PDT 2020
hokein marked an inline comment as done.
hokein added inline comments.
================
Comment at: clang/lib/Sema/SemaOverload.cpp:14105
case OR_No_Viable_Function:
CandidateSet.NoteCandidates(
----------------
It is a bit sad that the broken function call cases (too many/few agguments) are failing into this group, all candidates are not viable -- this means we don't get any benefits (no `Best`), for some cases, it is suboptimal even though the best candidate looks like obvious.
```
class Collection {
const char *find(int) const;
char* find(int);
};
void test1(const Collection &C) {
C.find(); // we want const char*, but all overloads are not viable and return types are not the same, so no type captured here.
}
```
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D80109/new/
https://reviews.llvm.org/D80109
More information about the cfe-commits
mailing list