https://bugs.llvm.org/show_bug.cgi?id=46424

            Bug ID: 46424
           Summary: false-positive -Wunused-local-typedef warning for use
                    in dependent scope specifier
           Product: clang
           Version: unspecified
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++11
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected],
                    [email protected], [email protected],
                    [email protected]

Testcase from Jens Maurer:

template <class T>
struct B
{
   void f();
};

template <class T>
struct D : public B<T>
{
   using Base = B<T>;
   void f();
};
template <class T>
void g()
{
   D<T> d;
   using X = typename D<T>::Base;
   d.X::f();
}

... produces a bogus warning:

<source>:17:10: warning: unused type alias 'X' [-Wunused-local-typedef]
   using X = typename D<T>::Base;
         ^

(Presumably we are not marking the FirstQualifierInScope as referenced after
doing the fallback lookup for X when parsing g().)

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to