[clang] Reapply "[Clang][Sema] Use the correct lookup context when building overloaded 'operator->' in the current instantiation (#104458)" (PR #109422)

Krystian Stasiowski via cfe-commits cfe-commits at lists.llvm.org
Fri Sep 20 09:05:18 PDT 2024


sdkrystian wrote:

> Does this need a release note? 

I don't think so, since this fixes a bug introduced in the same release.

> Also, can you point out the 'diff' from the previous commit?

The condition of [the assert in `SemaExprCXX.cpp`](https://github.com/llvm/llvm-project/pull/109422/files#diff-1420e9cbc74252d1c2e98a97f80d3741bb4a44e8469d326ba3aa337260ee9800R8009) was changed from `BaseType->isDependentType()` to `Base->isTypeDependent()`, as was the condition on [line 1318 in `SemaExprMember.cpp`](https://github.com/llvm/llvm-project/pull/109422/files#diff-666d45282070e66014f8fb70e6c089762ea67ad4891f9819fdf5f8a5d5a0f570R1318).

> I'm really not a fan of the 'out' parameter, I'd prefer perhaps returning a `std::pair` + structured binding. WDYT?

My initial solution was to return `ExprEmpty()`, but I changed to using an out parameter in response to review feedback (I don't like out parameters either).

https://github.com/llvm/llvm-project/pull/109422


More information about the cfe-commits mailing list