[PATCH] D158873: [clangd] Do not ignore qualifier in heuristic resolution of dependent MemberExpr

Sam McCall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Aug 25 13:12:40 PDT 2023


sammccall accepted this revision.
sammccall added a comment.
This revision is now accepted and ready to land.

Oh, this is surprising!



================
Comment at: clang-tools-extra/clangd/HeuristicResolver.cpp:142
+    // Do not proceed to try resolving the member in the expression's base type
+    // without regard to the qualifier, as that could produce incorrect results.
+    return {};
----------------
I think the pattern from the testcase clarifies enough to be worth an extra line

> `void foo() { this->Base::foo(); }` shouldn't resolve to foo() itself!


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D158873/new/

https://reviews.llvm.org/D158873



More information about the cfe-commits mailing list