[LLVMbugs] [Bug 19352] New: getLocation() points to the wrong position for FriendDecls

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Mon Apr 7 03:05:24 PDT 2014


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

            Bug ID: 19352
           Summary: getLocation() points to the wrong position for
                    FriendDecls
           Product: clang
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
          Assignee: unassignedclangbugs at nondot.org
          Reporter: klimek at google.com
                CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
    Classification: Unclassified

Locations of friend declarations that are type declarations should point to the
declared identifier.

struct A {};
A g();

struct B {
  friend void f(); // getLocation() correctly points to 'f'.
  friend class X; // getLocation() incorrectly points to 'friend'.

  // Of course arbitrary type expressions are allowed here, too, in
  // which case I'd assume it's fine for getLocation() to point to 
  // the start:
  friend decltype(g());
};

-- 
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/20140407/4e706ea9/attachment.html>


More information about the llvm-bugs mailing list