[LLVMbugs] [Bug 15772] New: no diagnostic for template friend which names nonexistent class member

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Wed Apr 17 11:58:08 PDT 2013


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

            Bug ID: 15772
           Summary: no diagnostic for template friend which names
                    nonexistent class member
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
          Assignee: unassignedclangbugs at nondot.org
          Reporter: richard-llvm at metafoo.co.uk
                CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
    Classification: Unclassified

Clang accepts this:

  struct X { const char *f(); };
  struct B { template<typename T> friend void X::f(T); };

It looks like we're injecting the friend template into the scope of X rather
than requiring it to redeclare a member in X. We do diagnose if there is no
function named 'f' in X, however.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20130417/1b8077d3/attachment.html>


More information about the llvm-bugs mailing list