[clang] Add the check of membership in decltype for the issue #58674#
Originally, the code would take a lookup result as a member in the current scope and build a member expression accordingly, if the lookup result was not an operand of the address operator, or it was a field declaration. However, a field declaration may come from another class, and cause the issue #58674. Thus, this patch fixes the issue via checking where does the field declaration comes from, and if it comes from another class, then marks it as not member in the current scope. The parent scopes of the current scope are also checked, as the current scope may be associated to a lambda or friend declaration. Differential Revision: https://reviews.llvm.org/D137531
Loading
Please sign in to comment