[LLVMbugs] [Bug 9853] New: Friends allowed to define member functions

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Thu May 5 16:38:19 PDT 2011


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

           Summary: Friends allowed to define member functions
           Product: clang
           Version: unspecified
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: scshunt at csclub.uwaterloo.ca
                CC: llvmbugs at cs.uiuc.edu, dgregor at apple.com


We accept the following:

struct bar {
 void baz();
};

struct foo {
  friend void bar::baz() { }
};

which is ill-formed as bar::baz is a) a qualified-name and b) not at namespace
scope. We should error this.

-- 
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