Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reapply "[Clang][Sema] Diagnose class member access expressions naming non-existent members of the current instantiation prior to instantiation in the absence of dependent base classes (#84050)" #90152

Merged
merged 2 commits into from
Apr 30, 2024

Commits on Apr 30, 2024

  1. Reapply "[Clang][Sema] Diagnose class member access expressions namin…

    …g non-existent members of the current instantiation prior to instantiation in the absence of dependent base classes (llvm#84050)"
    
    Consider the following:
    ```cpp
    template<typename T>
    struct A
    {
        auto f()
        {
            return this->x;
        }
    };
    ```
    Although `A` has no dependent base classes and the lookup context for
    `x` is the current instantiation, we currently do not diagnose the
    absence of a member `x` until `A<T>::f` is instantiated. This patch
    moves the point of diagnosis for such expressions to occur at the point
    of definition (i.e. prior to instantiation).
    sdkrystian committed Apr 30, 2024
    Configuration menu
    Copy the full SHA
    2d613e8 View commit details
    Browse the repository at this point in the history
  2. [FOLD] Fix arrow operator for expressions with non-pointer type that …

    …is the current instantiation
    sdkrystian committed Apr 30, 2024
    Configuration menu
    Copy the full SHA
    8de588d View commit details
    Browse the repository at this point in the history