[LLVMbugs] [Bug 13403] New: Clang does not properly resolve classname::classname as constructor

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Thu Jul 19 09:50:31 PDT 2012


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

             Bug #: 13403
           Summary: Clang does not properly resolve classname::classname
                    as constructor
           Product: clang
           Version: trunk
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: seth.cantrell at gmail.com
                CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
    Classification: Unclassified


Given the following:

struct A {
   A() {}
   A(int) {}
};

int main() {
   int i;
   {
       A::A(i); // <---
   }
}

Clang parses the marked line as a variable declaration:

ConsoleApplication1.cpp:9:13: warning: declaration shadows a local variable
[-Wshadow]
       A::A(i); // <---
            ^

This is due to clang parsing A::A as a reference to the injected class name
instead of as an illegal reference to A's constructor.

Related bugs: 8263 8236

Related email thread:

http://lists.cs.uiuc.edu/pipermail/cfe-dev/2012-July/022867.html

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