[PATCH] D155370: [CodeComplete] Improve FunctionCanBeCall
Younan Zhang via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sat Jul 29 21:32:30 PDT 2023
zyounan added inline comments.
================
Comment at: clang/lib/Sema/SemaCodeComplete.cpp:1407
R.FunctionCanBeCall =
CurrentClassScope &&
----------------
zyounan wrote:
> The current heuristic results in the following:
>
> ```
> struct Base {
> void foo(int);
> };
> struct Derived : Base {
> void foo(float);
> };
>
> int main() {
> Derived d;
> d.Base::^ // FunctionCanBeCall for `foo` is false.
> }
> ```
>
> In situations where it is intended to invoke base member functions hidden by subclasses, we shouldn't remove parentheses, IMO.
D156605 to address this.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D155370/new/
https://reviews.llvm.org/D155370
More information about the cfe-commits
mailing list