[LLVMbugs] [Bug 13029] New: perform lookup into dependent bases for typo correction / error recovery

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Tue Jun 5 13:53:37 PDT 2012


http://llvm.org/bugs/show_bug.cgi?id=13029

             Bug #: 13029
           Summary: perform lookup into dependent bases for typo
                    correction / error recovery
           Product: clang
           Version: unspecified
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: C++11
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: richard-llvm at metafoo.co.uk
                CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
    Classification: Unclassified


This code:

template<typename T> struct A { typedef T type; };

template<typename T> struct B : A<T> {
  void f(type arg);
};

... gives a somewhat respectable diagnostic:

<stdin>:4:10: error: unknown type name 'type'
  void f(type arg);
         ^

However, it'd be much more awesome if we looked through the definition of the
primary template for the dependent base class (and maybe also through any of
its specializations) and could instead produce this:

<stdin>:4:10: error: must qualify identifier to find type 'type' from dependent
base class
  void f(type arg);
         ^
         A::

-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the llvm-bugs mailing list