[LLVMbugs] [Bug 6508] New: Forwarding 0 as a pointer using rvalue references doesn't work
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Fri Mar 5 01:05:38 PST 2010
http://llvm.org/bugs/show_bug.cgi?id=6508
Summary: Forwarding 0 as a pointer using rvalue references
doesn't work
Product: clang
Version: trunk
Platform: PC
OS/Version: Windows XP
Status: NEW
Severity: enhancement
Priority: P5
Component: AST
AssignedTo: unassignedclangbugs at nondot.org
ReportedBy: ahmedcharles at gmail.com
CC: llvmbugs at cs.uiuc.edu
std::pair in c++0x has additional constructor overloads which take rvalue
references and forward them to the stored type's constructors. Rvalue
references forward 0 as an int rather than as a pointer. nullptr can be used to
solve this problem, but since that is not universally supported,
static_cast'ing the 0 to the expected pointer type is sufficient.
include/clang/Analysis/ProgramPoint.h:62
include/clang/AST/DeclContextInternals.h:157
lib/AST/DeclBase.cpp:796
lib/AST/DeclBase.cpp:802
lib/AST/Expr.cpp:2160
lib/AST/Expr.cpp:2162
lib/Checker/GRExprEngine.cpp:1872
--
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