[LLVMbugs] [Bug 9507] New: Lvalue transformation not ignored when parameter is a const-reference

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Fri Mar 18 07:02:43 PDT 2011


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

           Summary: Lvalue transformation not ignored when parameter is a
                    const-reference
           Product: clang
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++0x
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: schaub.johannes at googlemail.com
                CC: llvmbugs at cs.uiuc.edu, dgregor at apple.com


This should be ambiguous (the array to pointer conversion for the first
candidate should not make the candidate worse than the second one):

void f(int * const&);
void f(int const(&)[1]);

int main() {
  int n[1];
  f(n);
}

Clang takes the second one. If we make the parameter of the first a "int *",
Clang behaves as expected.

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