Skip to content
Commit f438a020 authored by Reid Kleckner's avatar Reid Kleckner
Browse files

Diagnose UnresolvedLookupExprs that resolve to instance members in static methods

During the initial template parse for this code, 'member' is unresolved
and we don't know anything about it:

  struct A { int member };
  template <typename T>
  struct B : public T {
    using T::member;
    static void f() {
      (void)member; // Could be static or non-static.
    }
  };
  template class B<A>;

The pattern declaration contains an UnresolvedLookupExpr rather than an
UnresolvedMemberExpr because `f` is static, and `member` should never be
a field. However, if the code is invalid, it may become a field, in
which case we should diagnose it.

Reviewers: rjmccall, rsmith

Differential Revision: http://reviews.llvm.org/D6700

llvm-svn: 250592
parent 4f43e80e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment