[LLVMbugs] [Bug 23401] New: Incorrect location of a friend declaration

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Sun May 3 06:14:46 PDT 2015


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

            Bug ID: 23401
           Summary: Incorrect location of a friend declaration
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: normal
          Priority: P
         Component: Support Libraries
          Assignee: unassignedbugs at nondot.org
          Reporter: dpldobrev at yahoo.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

I have the following header:


class Class1
{
};

class Class2
{
public:
    friend inline const Class1 operator+(const Class1& f1, const Class1& f2);
};

inline const Class1 operator+(const Class1& f1, const Class1& f2)
{
    return TestTemplateClass2();
}


Decl::getLocation() returns line 8 for the friend - that's correct. But it
returns 8 for the friend declaration, that is, the function itself, too, while
the function is actually located at line 11. If the friend is deleted, then the
correct location is reported.

-- 
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/20150503/3232d05c/attachment.html>


More information about the llvm-bugs mailing list