HomePhabricator

Don't see through 'using member-declarations' when determining the relation of…

Description

Don't see through 'using member-declarations' when determining the relation of any potential implicit object expression to the parent class of the member function containing the function call.

Prior to this patch clang would not error here:

template <class T> struct B;

template <class T> struct A {
  void foo();
  void foo2();
  
  void test1() {
    B<T>::foo();  // OK, foo is declared in A<int> - matches type of 'this'.
    B<T>::foo2(); // This should be an error!  
                  // foo2 is found in B<int>, 'base unrelated' to 'this'.
  }
};

template <class T> struct B : A<T> {
  using A<T>::foo2;
};

Details

Committed
faisalvAug 27 2017, 9:49 AM
Parents
rL311850: [ARM] Tidy-up ARMAsmParser. NFC.
Branches
Unknown
Tags
Unknown