[LLVMbugs] [Bug 13370] New: Catch derived-to-base conversions on function arguments where it looks like an array is passed
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Sun Jul 15 18:19:11 PDT 2012
http://llvm.org/bugs/show_bug.cgi?id=13370
Bug #: 13370
Summary: Catch derived-to-base conversions on function
arguments where it looks like an array is passed
Product: clang
Version: trunk
Platform: PC
OS/Version: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: C++
AssignedTo: unassignedclangbugs at nondot.org
ReportedBy: richard-llvm at metafoo.co.uk
CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
Classification: Unclassified
We should diagnose cases where it "looks like" an array of T is being passed to
a function via a U* pointer, where U is a base class of T. Specifically, if we
have:
f(..., x.f1(), x.f2(), ...)
where 'x.f1()' undergoes an implicit derived-to-base conversion, and 'x.f2()'
is of integral type, ALARM BELLS. [Likewise for cases like "f(..., expr, expr +
k, ...)", if there's an implicit derived-to-base conversion for both
arguments].
See llvm.org/PR13365 and r160245 for an insidious clang bug which this would
have caught.
--
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