[LLVMbugs] [Bug 14222] New: Why a formal parameter object of a function can not be treated as a object reference
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Tue Oct 30 19:44:17 PDT 2012
http://llvm.org/bugs/show_bug.cgi?id=14222
Bug #: 14222
Summary: Why a formal parameter object of a function can not be
treated as a object reference
Product: clang
Version: trunk
Platform: PC
OS/Version: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: C++
AssignedTo: unassignedclangbugs at nondot.org
ReportedBy: 200005275 at 163.com
CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
Classification: Unclassified
Created attachment 9467
--> http://llvm.org/bugs/attachment.cgi?id=9467
the test case for this problem.
I defined a function like this:
int foo( AA& a);
when i use the function like this:
int rec2 = foo(AA(1));
i compiled it but i got an error:
reference_test.cpp:18:14: error: no matching function for call to 'foo'
int rec2 = foo(AA(1));
if i use the function like this:
AA aa(1);
int rec1 = foo(aa);
it worked well.
But both method can work on VS2012,i am not sure if it is a bug or clang do it
purposely.
--
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