[LLVMbugs] [Bug 7173] New: Invalid warning on references in structs
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Wed May 19 12:47:01 PDT 2010
http://llvm.org/bugs/show_bug.cgi?id=7173
Summary: Invalid warning on references in structs
Product: clang
Version: trunk
Platform: PC
OS/Version: All
Status: NEW
Severity: enhancement
Priority: P
Component: C++
AssignedTo: unassignedclangbugs at nondot.org
ReportedBy: chris at bubblescope.net
CC: llvmbugs at cs.uiuc.edu, dgregor at apple.com
The following code produces an invalid warning, as the reference being returned
is itself a reference, not stack memory. Code like this exists in
boost::parameter.
struct X
{ int& i; };
int& getX(X x)
{ return x.i; }
-------
temp.cc:5:10: warning: reference to stack memory associated with local variable
'x' returned
{ return x.i; }
--
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